Method and apparatus for automatically producing a machining program

ABSTRACT

A method and apparatus able to quickly and accurately automatically produce machining programs for complicated shapes of products without being affected by the level of knowledge or experience of the operator. A cutting-condition determination processing unit ( 20 ) of an automatic programming apparatus ( 10 ) specifies required standard cutting condition data from the type of material and the types of processes designated by an input unit ( 12 ) in a cutting condition data table ( 24 ) stored in a storage unit ( 18 ), specifies the tool data corresponding to the types of tools designated by the input unit in the tool data table ( 26 ) stored in the storage unit, and determines the cutting conditions relating to the type of material and the tools from the standard cutting condition data and the tool data. A program-generation processing unit ( 22 ) specifies a program-generation algorithm corresponding to the designated process in an algorithm table ( 28 ) stored in the storage unit and generates machining programs based on the determined cutting conditions in accordance with the program-generation algorithm.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a divisional of application Ser. No. 10/168,824filed Jun. 25, 2002 now U.S. Pat. No. 6,804,575, which is a §371 ofInternational Application No. PCT/JP01/09453 filed Oct. 26, 2001, thecontents of both of which are incorporated herein by reference.

TECHNICAL FIELD

The present invention relates to a method and apparatus forautomatically producing a machining program to be executed by a machinetool. More particularly, the present invention relates to a method andapparatus for automatically producing a multi-line control program to beexecuted by an NC (numerical control) machine tool having at least onespindle and at least one tool rest both operable under control of aplurality of lines.

BACKGROUND ART

In recent years, in the field of NC machine tools, progress has beenmade in multiple function machining enabling complicated and diverseshapes of products to be automatically machined by providing turningtools, drills, mills, and other various types of tools exchangeably ontool rests and enabling execution of turning, drilling, milling, andother various machining processes using them.

Further, in NC lathes and other automatic lathes (that is, lathes ableto automatically perform machining), multi-function type NC lathesdesigned to shorten the machining time by centrally placing at least onespindle and at least one tool rest, both operable under the control of aplurality of lines, on a single lathe bed to enable simultaneousdifferent types of machining (for example, outer diametrical cutting andboring) on the same workpiece (for example, bar) or simultaneousmachining of different workpieces.

Note that the term “line” means a combination of a group of control axescontrolled by a single machining program (including case of only onecontrol axis). When it is possible to set a plurality of types ofcombinations of groups of control axes on a single NC machine tool, thecontrol system in that NC machine tool is generally called “multi-linecontrol (or multi-path control)”.

When trying to perform various types of machining processessimultaneously or in a desired order on a single workpiece in such amultiple function machining NC machine tool, the work of producing theseries of machining programs and registering them in the NC devicerequires advanced programming skills, so tends to place a considerableburden on the operator.

On the other hand, in the field of NC machine tools, variousconfigurations of automatic programming apparatuses provided in relationto NC devices have been proposed to reduce the labor demanded from theoperator at the time of preparing the machining programs. This type ofautomatic programming apparatus usually is provided with a CPU, memory,keyboard, display, etc. and is designed to acquire the data required forexecuting machining processes from dialog type instructions and inputdata from the operator for various selection items or required itemsdisplayed in order on the display and, if necessary, geometric data ofthe machined product input by a drawing format through a graphic inputdevice such as a CAD system and to use this to automatically produce therequired machining programs. According to this automatic programmingapparatus, the work of the operator inputting the machining programs byphrases is eliminated, so even an operator with inferior programmingskills can prepare complicated machining programs in a relatively shorttime.

In the above conventional automatic programming apparatus, while thetime of production of machining programs by the operator is effectivelyshortened, the various data required for the programming is judged andset by the operator with reference to the design drawings of themachined product, so sufficient knowledge about the machining processesor tool attributes is required from the operator.

For example, when producing a series of machining programs for executingthe various automatic cutting processes for a single machined productusing a multi-spindle, multi-line control type NC lathe provided with aplurality of types of tools on a plurality of tool rests, the operatorhas to read the types of processes required for the machining from thedesign drawings of the machined product and, while considering thematerial of the workpiece, suitably judge, set, and input the datarequired for each machining range in the individual processes (such astypes of tools, movement positions of noses, relative cutting speeds ofnoses and/or relative feed rate of tool rests). In particular, datarelating to the cutting conditions such as the cutting speed and thefeed rate vary in most suitable values in accordance with the tool noseand the material of the workpiece. The accuracy of judgement and theresultant machining accuracy tend to be governed by the level knowledgeor experience of the operator.

Further, when producing a multi-line control program for executingvarious automatic cutting processes on a single machined product by sucha multi-spindle, multi-line control type NC lathe in parallel by aplurality of lines, the operator is required to read the types ofprocesses required for the machining from the design drawings and thensuitably judge and design what line and at what time to execute theindividual processes would be most advantageous in terms of workefficiency. In particular, when attaching designated tools to be used inthe cutting processes on the tool mounts of the tool rests, it issometimes necessary to use special tool holders depending on the typesof the designated tools or the configurations of the tool rests. In thatcase, however, the operator must decide how to allocate and attach theplurality of designated tools to the plurality of tool mounts providedon a single tool rest with reference to the numbers of the plurality oftypes of tool holders in stock for the different types and theirattributes (such as types of mountable tool rests, types of processesused for and/or attributes of tools for use).

In this way, to produce a highly efficient multi-line control program bythe conventional automatic programming apparatus, the operator wasrequired to be fully knowledgeable about the machine configuration ofthe NC machine tool covered and maintain an accurate grasp of theattributes of the plurality of types of tool holders able to be used inthat NC machine tool and the numbers in stock and then suitably allocateand designate attachment locations of the plurality of designated toolsto the plurality of tool mounts of one or more tool rests. As a result,a tremendous amount of time and effort is spent on producing themulti-line control program. Further, the quality of the automaticallyproduced multi-line control program (such as length of cycle time,appropriateness of tool management and/or machining accuracy) tends tobe remarkably affected by the level of knowledge or experience of theoperator.

Further, in the conventional automatic programming apparatus, when theoperator checks the content of the produced machining programs, thetroublesome work is required of displaying and reading the series ofblocks describing the machining programs on a display. With check workof such a program display method, it was hard to obtain a grasp of thetime spent for the individual processes and difficult to optimize theprogramming for shortening the machining time. Further, judging whetherthe order of execution of the plurality of processes for producing asingle machined product can be changed for streamlining the machiningwork or predicting the impact of a change in the order of processing onthe series of machining programs as a whole was extremely difficult withthe conventional program display method.

DISCLOSURE OF THE INVENTION

Therefore, an object of the present invention is to provide an automaticprogramming method and an automatic programming apparatus enabling aseries of machining programs for automatically machining complicated anddiverse shapes of machined products by a multiple function machining NCmachine tool to be quickly and accurately automatically produced withoutbeing affected by the level of knowledge or experience of the operator.

Another object of the present invention is to provide an automaticprogramming method and an automatic programming apparatus enabling theplurality of processes required for production of a machined product tobe efficiently and suitably automatically allocated to a plurality oflines when automatically producing a multi-line control program to beexecuted by a multi-spindle, multi-line control type NC machine tool andthereby enabling a high quality multi-line control program to be quicklyautomatically produced without being affected by the level of knowledgeor experience of the operator.

Still another object of the present invention is to provide a programdisplay processing method able to be effectively used in the art ofautomatic programming, which program display processing method enablesan operator to easily check the contents of a series of machiningprograms for executing a plurality of processes or the time to be spentby the individual processes or changing the order of execution of theseprocesses.

To achieve the above objects, the present invention, in a first aspect,provides an automatic programming method for automatically producing amachining program to be executed in an NC machine tool, comprisingpreviously setting and registering a plurality of standard cuttingcondition data relating to cuttings conditions required in a pluralityof types of cutting processes capable of being performed in an NCmachine tool, the plurality of standard cutting condition data beingprepared respectively for the plurality of types of cutting processesand individually corresponding to a plurality of kinds of material ofworkpieces; previously registering a plurality of tool data relating toattributes of a plurality of types of tools capable of being used in theplurality of types of cutting processes; previously setting andregistering a plurality of program generating algorithms used forgenerating machining programs for executing the plurality of types ofcutting processes, the plurality of program generating algorithms beingprepared respectively for the plurality of types of cutting processes;selecting and designating a kind of material of a workpiece, a type ofat least one of the cutting processes performed for the workpiece, and atype of tool used in each of the at least one of the cutting processes;specifying standard cutting condition data corresponding to each of theat least one of the cutting processes, among the plurality of standardcutting condition data as previously registered, on the basis of thekind of material of the workpiece as designated and the type of at leastone of the cutting processes as designated, specifying tool datacorresponding to the type of the tool as designated, among the pluralityof sets of tool data as previously registered, and determining a cuttingcondition required in association with the kind of material and the toolin each of the at least one of the cutting processes, on the basis ofthe standard cutting condition data as specified and the tool data asspecified; and specifying a program generating algorithm correspondingto each of the at least one of the cutting processes as designated,among the plurality of program generating algorithms as previouslyregistered, and generating a machining program for each of the at leastone of the cutting processes, on the basis of the cutting condition asdetermined, in accordance with the program generating algorithm asspecified.

An automatic programming method according to a preferred embodimentfurther comprises, prior to the generating of the machining program,previously setting and registering a plurality of standard machiningconditions required in the plurality of types of cutting processes, theplurality of standard machining conditions being prepared respectivelyfor the plurality of types of cutting processes, and specifying astandard machining condition required in each of the at least one of thecutting processes, among the plurality of standard machining conditionsas previously registered, on the basis of the type of at least one ofthe cutting processes as designated; wherein the machining program isgenerated by using the standard machining condition as specified.

In this configuration, it is advantageous that the standard machiningcondition be freely changeable.

Further, the above automatic programming method preferably furthercomprises, prior to the generating of the machining program,registering, in response to a requirement, supplementary dataindividually required corresponding to the type of at least one of thecutting processes as designated; wherein the machining program isgenerated by using the supplementary data as registered.

In this configuration, it is advantageous that the supplementary data beregistered by a drawing.

Further, the above automatic programming method preferably furthercomprises, prior to the determining of the cutting condition, previouslysetting and registering a cutting condition calculating expression forcalculating the cutting condition on the basis of the standard cuttingcondition data as specified and the tool data as specified, the cuttingcondition calculating expression being prepared respectively for theplurality of types of cutting processes; wherein the cutting conditionis determined in accordance with the cutting condition calculatingexpression as registered.

Further, the automatic programming method preferably further comprises,prior to the determining of the cutting condition, previously settingand registering a standard parameter for adjusting the standard cuttingcondition data correspondingly to an attribute of the tool, the standardparameter being prepared respectively for the attributes of tools andthe plurality of kinds of material of workpieces; wherein the cuttingcondition is determined by using the standard parameter as registered.

Further, the automatic programming method preferably further comprises,as occasion demands, modifying the machining program as generated, bychanging the cutting condition as determined.

In this configuration, it is advantageous that the method furthercomprise, after the changing of the cutting condition, calculating achanging parameter for enabling the cutting condition as changed formodifying the machining program to be determined on the basis of thestandard cutting condition data, and registering the changing parameterin such a manner as to be prepared respectively for the attributes oftools and the plurality of kinds of material of workpieces.

In this configuration, it is advantageous that the method furthercomprise, prior to the determining of the cutting condition, previouslysetting and registering a standard parameter for adjusting the standardcutting condition data correspondingly to an attribute of the tool, thestandard parameter being prepared respectively for the attributes oftools and the plurality of kinds of material of workpieces; wherein thecutting condition is determined by using the standard parameter asregistered; and further comprise, in a case where the changingparameter, capable of being specified on the basis of the attribute ofthe tool and the kind of material of the workpiece as designated, isregistered, determining the cutting condition by using the changingparameter instead of the standard parameter capable of being specifiedon the basis of a same attribute of the tool and a same kind of materialof the workpiece, whenever the machining program is automaticallyproduced.

In this configuration, it is advantageous that either one of thestandard parameter and the changing parameter, which are capable ofbeing specified on the basis of mutually identical attributes of thetool and mutually identical kinds of material of the workpiece, beselected to determine the cutting condition.

The standard cutting condition data may include data of relative cuttingspeed between a cut point on the workpiece and a nose of the tool aswell as data of relative in-feed between the workpiece and the tool.

In this configuration, in a case where the type of at least one of thecutting processes as designated is a turning process, the cuttingcondition may include a speed of a spindle for rotating the workpiece aswell as a relative in-feed between the workpiece and the tool.

Further, in a case where the kind of the tool as designated is a rotarytool, the cutting condition may include a speed of the rotary tool aswell as a relative in-feed between the workpiece and the rotary tool.

The present invention, in another aspect, provides an automaticprogramming apparatus for automatically producing a machining program tobe executed in an NC machine tool, comprising a storage unit previouslystoring various tables including a cutting condition table into which aplurality of standard cutting condition data, relating to cuttingconditions required in a plurality of types of cutting processes capableof being performed in an NC machine tool, are set and registered, theplurality of standard cutting condition data being prepared respectivelyfor the plurality of types of cutting processes and individuallycorresponding to a plurality of kinds of material of workpieces, a tooldata table into which a plurality of sets of tool data, relating toattributes of a plurality of types of tools capable of being used in theplurality of types of cutting processes, are registered, and analgorithm table into which a plurality of program generating algorithms,used for generating machining programs for executing the plurality oftypes of cutting processes, are set and registered, the plurality ofprogram generating algorithms being prepared respectively for theplurality of types of cutting processes; as well as various screens,associated with the various tables, including a material designationscreen showing names of the plurality of kinds of material ofworkpieces, a process designation screen showing names of the pluralityof types of cutting processes, and a tool designation screen showingnames of the plurality of types of tools; a display unit selectivelydisplaying the various screens stored in the storage unit; an input unitaccepting, in relation to the various screens displayed in the displayunit, designations of a kind of material of a workpiece, a type of atleast one of the cutting processes performed for the workpiece, and atype of tool used in each of the at least one of the cutting processes;a cutting condition determination processing unit specifying and readingstandard cutting condition data required in each of the at least one ofthe cutting processes, from the cutting condition data table stored inthe storage unit, on the basis of the kind of material of the workpieceas designated through the input unit and the type of at least one of thecutting processes as designated therethrough, specifying and readingtool data corresponding to the type of the tool as designated throughthe input unit, from the tool data table stored in the storage unit, anddetermining a cutting condition associated with the kind of material andthe tool, on the basis of the standard cutting condition data as readand the tool data as read; and a program generation processing unitspecifying and reading a program generating algorithm corresponding toeach of the at least one of the cutting processes as designated throughthe input unit, from the algorithm table stored in the storage unit, andgenerating a machining program for each of the at least one of thecutting processes, on the basis of the cutting condition as determinedin the cutting condition determination processing unit, in accordancewith the program generating algorithm as read.

According to a preferred embodiment, the storage unit previously storesa standard machining condition table into which a plurality of standardmachining conditions, required in the plurality of types of cuttingprocesses, are set and registered, the plurality of standard machiningconditions being prepared respectively for the plurality of types ofcutting processes; and the program generation processing unit specifiesand reads a standard machining condition required in each of the atleast one of the cutting processes, from the standard machiningcondition tables as previously stored in the storage unit, on the basisof the type of at least one of the cutting processes as designatedthrough the input unit, to generate the machining program by using thestandard machining condition as read.

In this configuration, it is advantageous that the standard machiningcondition in the standard machining condition table be freelychangeable.

Further, it is preferable that the input unit accept, in response to arequirement, a registration of supplementary data individually requiredcorrespondingly to the type of at least one of the cutting processes asdesignated; and the program generation processing unit generate themachining program by using the supplementary data as accepted in theinput unit.

In this configuration, it is advantageous that the input unit accept theregistration of the supplementary data by a drawing.

Further, preferably the storage unit previously stores a cuttingcondition calculating expression table into which a plurality of cuttingcondition calculating expressions, for calculating the cutting conditionon the basis of the standard cutting condition data and the tool data,are set and registered, the cutting condition calculating expressionsbeing prepared respectively for the plurality of types of cuttingprocesses; and the cutting condition determination processing unitspecifies and reads a cutting condition calculating expressioncorresponding to each of the at least one of the cutting processes, fromthe cutting condition calculating expression table as stored in thestorage unit, on the basis of the type of at least one of the cuttingprocesses as designated through the input unit, to determine the cuttingcondition in accordance with the cutting condition calculatingexpression as read.

Alternatively, preferably the storage unit previously stores a standardparameter table into which a plurality of standard parameters, foradjusting the standard cutting condition data correspondingly to anattribute of the tool, are set and registered, the standard parametersbeing prepared respectively for the attributes of tools and theplurality of kinds of material of workpieces; and the cutting conditiondetermination processing unit specifies and reads a standard parameterrequired in each of the at least one of the cutting processes asdesignated through the input unit, from the standard parameter table asstored in the storage unit, on the basis of the kind of material of theworkpiece as designated through the input unit and the attribute of thetool as designated therethrough, to determine the cutting condition byusing the standard parameter as read.

Further, preferably the input unit accepts, as occasion demands, achange of the cutting condition; and wherein the program generationprocessing unit modifies the machining program as generated, inaccordance with the change of the cutting condition as accepted in theinput unit.

In this configuration, it is advantageous that the cutting conditiondetermination processing unit calculate, after the cutting condition ischanged, a changing parameter for enabling the cutting condition aschanged for modifying the machining program to be determined on thebasis of the standard cutting condition data; and the storage unit storethe changing parameter as calculated, in such a manner as to be preparedrespectively for the attributes of tools and the plurality of kinds ofmaterial of workpieces.

In this configuration, it is advantageous that the storage unitpreviously store a standard parameter table into which a plurality ofstandard parameters, for adjusting the standard cutting condition datacorrespondingly to an attribute of the tool, are set and registered, thestandard parameters being prepared respectively for the attributes oftools and the plurality of kinds of material of workpieces; wherein thecutting condition determination processing unit specifies and reads astandard parameter required in each of the at least one of the cuttingprocesses as designated through the input unit, from the standardparameter table as stored in the storage unit, on the basis of the kindof material of the workpiece as designated through the input unit andthe attribute of the tool as designated therethrough, to determine thecutting condition by using the standard parameter as read; and thecutting condition determination processing unit determine, in a casewhere the changing parameter, capable of being specified on the basis ofthe attribute of the tool and the kind of material of the workpiece asselected, is stored in the storage unit, the cutting condition by usingthe changing parameter instead of the standard parameter capable ofbeing specified on the basis of a same attribute of the tool and a samekind of material of the workpiece, whenever the machining program isautomatically produced.

In this configuration, it is advantageous that the cutting conditiondetermination processing unit select either one of the standardparameter and the changing parameter, which are capable of beingspecified on the basis of mutually identical attributes of the tool andmutually identical kinds of material of the workpiece, to determine thecutting condition.

The standard cutting condition data may include data of relative cuttingspeed between a cut point on the workpiece and a nose of the tool aswell as data of relative in-feed between the workpiece and the tool.

In this configuration, in a case where the type of at least one of thecutting processes as designated through the input unit is a turningprocess, the cutting condition may include a speed of a spindle forrotating the workpiece as well as a relative in-feed between theworkpiece and the tool.

Further, in a case where the kind of the tool as designated through theinput unit is a rotary tool, the cutting condition may include a speedof the rotary tool as well as a relative in-feed between the workpieceand the rotary tool.

The present invention, in a still further aspect, provides an automaticprogramming method for automatically producing a multi-line controlprogram executed in an NC machine tool provided with at least onespindle and at least one tool rest, both operable under control in aplurality of lines, comprising individually preparing and previouslyregistering a plurality of programs for controlling a plurality ofprocesses required to manufacture a machined product in the NC machinetool, without considering allocation of the programs to the plurality oflines; previously registering tool data relating to attributes of aplurality of types of tools capable of being used in a plurality oftypes of cutting processes capable of being performed in the NC machinetool; previously registering tool mount data relating to positions, inthe at least one tool rest, of a plurality of sets of tool mountsprovided in the at least one tool rest; previously registering a toolholder data relating to attributes of a plurality of types of toolholders capable of being installed onto the tool mounts; previouslysetting and registering a tool management determining algorithm used forallocating mounting locations of a plurality of designated tools,designated in the plurality of programs, for the tool mounts, providedthat some of the programs are executed simultaneously in at least twolines among the plurality of lines; specifying a plurality of toolmounts, as the mounting locations of designated tools, allowingexecution of a program associated with the designated tools, among theplurality of tool mounts, on the basis of the tool data and the toolmount data, and selecting a plurality of tool holders used for mountingthe designated tools correspondingly onto the plurality of tool mountsas specified, on the basis of the tool data and the tool holder data, inaccordance with the tool management determining algorithm; anddescribing a command, designating the plurality of tool mounts asspecified, into the plurality of programs, after the selecting of aplurality of tool holders is completed, and automatically allocating theplurality of programs to the plurality of lines.

The automatic programming method according to a preferred embodimentfurther comprises, prior to the allocating of the plurality of programsto the plurality of lines, selecting either one of three allocationconditions such as a preset data priority of tool management, a cycletime reduction of a multi-line control program and an improvement ofmachining accuracy; wherein the plurality of programs are automaticallyallocated to the plurality of lines under an allocation condition asselected.

Further, the above automatic programming method preferably furthercomprises, prior to the allocating of the plurality of programs to theplurality of lines, previously setting and registering a plurality oftypes of machining patterns for causing machining operations in asuitable combination of the at least one spindle and the at least onetool rest; wherein the plurality of programs are automatically allocatedto the plurality of lines on the basis of some machining patternsselected from the plurality of types of machining patterns.

Further, in the automatic programming method, preferably the tool holderdata includes an offset value of a tool nose inherent in each of theplurality of types of tool holders; and the method further comprises,after the selecting of the plurality of tool holders, describing acommand of position compensation into the plurality of programs, on thebasis of the offset value of tool nose of each of the tool holders asselected.

In the above automatic programming method, preferably the tool holderdata includes numbers of the plurality of types of tool holders instock, prepared respectively for the attributes of the holders; and theplurality of tool holders are selected under consideration of thenumbers in stock.

The present invention, in still another aspect, provides an automaticprogramming apparatus for automatically producing a multi-line controlprogram to be executed in an NC machine tool provided with at least onespindle and at least one tool rest, both operable under control in aplurality of lines, comprising a storage unit previously storing aplurality of programs individually prepared for controlling a pluralityof processes required to manufacture a machined product in the NCmachine tool, without considering allocation of the programs to theplurality of lines; tool data relating to attributes of a plurality oftypes of tools capable of being used in a plurality of types of cuttingprocesses capable of being performed in the NC machine tool; tool mountdata relating to positions, in the at least one tool rest, of aplurality of tool mounts provided in the at least one tool rest; toolholder data relating to attributes of a plurality of types of toolholders capable of being installed onto the tool mounts; and a toolmanagement determining algorithm used for allocating mounting locationsof a plurality of designated tools, designated in the plurality ofprograms, for the tool mounts, provided that some of the programs areexecuted simultaneously in at least two lines among the plurality oflines; a program allocation processing unit specifying a plurality oftool mounts, as the mounting locations of designated tools, allowingexecution of a program associated with the designated tools, among theplurality of tool mounts, on the basis of the tool data and the toolmount data stored in the storage unit, and selecting a plurality of toolholders used for mounting the designated tools correspondingly onto theplurality of tool mounts as specified, on the basis of the tool data andthe tool holder data stored in the storage unit, in accordance with thetool management determining algorithm; the program allocation processingunit describing a command, designating the plurality of tool mounts asspecified, into the plurality of programs, after the selecting of aplurality of tool holders is completed, and automatically allocating theplurality of programs to the plurality of lines.

An automatic programming apparatus according to a preferred embodimentfurther comprises an input unit accepting a designation for selectingeither one of three allocation conditions such as a preset data priorityof tool management, a cycle time reduction of multi-line controlprogram, and an improvement of machining accuracy; wherein the programallocation processing unit automatically allocates the plurality ofprograms to the plurality of lines under an allocation condition asselected through the input unit.

Further, preferably the storage unit previously stores a plurality oftypes of machining patterns for causing machining operations in asuitable combination of the at least one spindle and the at least onetool rest; and the program allocation processing unit automaticallyallocate the plurality of programs to the plurality of lines on thebasis of some machining patterns selected from the plurality of types ofmachining patterns stored in the storage unit.

Further, preferably the tool holder data stored in the storage unitincludes an offset value of a tool nose inherent in each of theplurality of types of tool holders; and the program allocationprocessing unit reads, after the selecting of the plurality of toolholders is completed, the offset value of tool nose in each of the toolholders as selected, from the tool holder data, and describes a commandof position compensation into the plurality of programs, on the basis ofthe offset value of tool nose as read.

Further, preferably the tool holder data stored in the storage unitincludes numbers of the plurality of types of tool holders in stock,prepared respectively for the attributes of the holders; and the programallocation processing unit specifies the plurality of tool mounts andselects the plurality of tool holders, under consideration of thenumbers in stock read from the tool holder data.

The present invention, in still another aspect, provides a programdisplay processing method for displaying, in a graphic screen, amulti-line control program to be executed in an NC machine tool providedwith at least one spindle and at least one tool rest, both operableunder control in a plurality of lines, comprising allocating a pluralityof programs, for controlling a plurality of processes required tomanufacture a machined product in the NC machine tool, to the pluralityof lines, to produce a multi-line control program; calculating runningtimes required in respective individual blocks in the multi-line controlprogram; investigating queuing positions of the programs between thelines in the multi-line control program; individually calculatingelapsed times from a program start-end to respective blocks in a seriesof the programs allocated to each of the plurality of lines; comparingthe elapsed times as calculated of the blocks at last stages of all ofthe lines, and defining a longest elapsed time as a cycle time of themulti-line control program; calculating start times and machining timesof respective the processes in each of the plurality of lines;calculating intervals between time graduations in the graphic screen, onthe basis of the cycle time as defined, so as to permit the multi-linecontrol program to be entirely displayed in a displayable area of aprogram displaying screen as previously provided; and respectivelyaligning rectangular strips, which respectively represent the processesin each of the plurality of lines, with the start times in correspondinglines, with reference to the time graduations as calculated, on thebasis of the start times and the machining times as calculated, anddisplaying the rectangular strips in the graphic screen.

Preferably, the multi-line control program is produced according to theabove automatic programming method.

In this configuration, the method further comprises, after thedisplaying of the rectangular strips representing the processes,changing a combination of some machining patterns as selected.

The changing of a combination of machining patterns may includeselecting and designating a machining pattern after changed, on thegraphic screen, among the plurality of types of machining patterns asregistered, designating the rectangular strip representing the processchangeable to the machining pattern as designated, and changing amachining pattern for performing the process corresponding to therectangular strip as designated into the machining pattern asdesignated, to display the latter.

Further, it is advantageous that, in a case where the machining patternafter changed is a machining pattern for a simultaneous machining, themethod comprise, prior to the display of the machining pattern afterchanged, judging whether the process corresponding to the rectangularstrip as designated is suitable for simultaneous machining; wherein themachining pattern after changed is displayed only when it is judged tobe suitable for simultaneous machining.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other objects, features, and advantages of the presentinvention will become clearer from the following explanation of thepreferred embodiments given in relation to the attached drawings. In theattached drawings,

FIG. 1 is a block diagram of the configuration of an automaticprogramming apparatus according to a first embodiment of the presentinvention;

FIG. 2A and FIG. 2B are flow charts of an automatic programming methodexecuted by the automatic programming apparatus of FIG. 1;

FIG. 3 is a view of a material designating screen in the automaticprogramming apparatus of FIG. 1;

FIG. 4A and FIG. 4B are views of a process designating screen in theautomatic programming apparatus of FIG. 1;

FIG. 5 is a view of a process list screen in the automatic programmingapparatus of FIG. 1;

FIG. 6 is a view of a tool designating screen in the automaticprogramming apparatus of FIG. 1;

FIG. 7 is a view of a data input screen in the automatic programmingapparatus of FIG. 1;

FIG. 8 is a view of another data input screen in the automaticprogramming apparatus of FIG. 1;

FIG. 9 is a view of still another data input screen in the automaticprogramming apparatus of FIG. 1;

FIG. 10 is a view of a program screen in the automatic programmingapparatus of FIG. 1 along with a process list screen and data inputscreen;

FIG. 11 is a view of a condition changing screen in the automaticprogramming apparatus of FIG. 1;

FIG. 12 is a block diagram of an automatic programming apparatusaccording to a second embodiment of the present invention;

FIG. 13 is a view schematically showing the configuration of importantparts of an NC lathe to which the automatic programming apparatus ofFIG. 12 can be applied;

FIG. 14A and FIG. 14B are flow charts of an automatic programming methodto be executed by the automatic programming apparatus of FIG. 12;

FIG. 15 is a view of an example of machining by a multi-line controlprogram prepared by the automatic programming apparatus of FIG. 12;

FIG. 16 is a view of a process list screen, data input screen, andprogram screen in the automatic programming apparatus of FIG. 12;

FIG. 17 is a view of a material designating screen in the automaticprogramming apparatus of FIG. 12;

FIG. 18 is a view of a holder stock screen in the automatic programmingapparatus of FIG. 12;

FIG. 19 is a view of a tool management determining screen in theautomatic programming apparatus of FIG. 12;

FIG. 20 is a view of a multi-line control program in the automaticprogramming apparatus of FIG. 12;

FIG. 21 is a view of a graphic screen displaying one multi-line controlprogram prepared by the automatic programming apparatus of FIG. 12;

FIG. 22 is a view of a graphic screen displaying another multi-linecontrol program prepared by the automatic programming apparatus of FIG.12;

FIG. 23 is a flow chart of a program display processing method accordingto an embodiment of the present invention;

FIG. 24A and FIG. 24B are views of graphic screens displayed by theprogram display processing method of FIG. 23;

FIG. 25 is a flow chart of a program display processing method accordingto another embodiment of the present invention;

FIG. 26 is a view of a graphic screen before change by the programdisplay processing method of FIG. 25; and

FIG. 27 is a view of a graphic screen changed by the program displayprocessing method of FIG. 25.

BEST MODE FOR CARRYING OUT THE INVENTION

Referring to the figures, FIG. 1 is a block diagram of the overallconfiguration of an automatic programming apparatus 10 according to afirst embodiment of the present invention, and FIG. 2A and FIG. 2B areflow charts of an automatic programming method according to anembodiment of the present invention executed by the automaticprogramming apparatus 10.

The automatic programming apparatus 10 executes the automaticprogramming method according to the present invention to automaticallyproduce a series of machining programs to be executed by a not shown NCmachine tool. An NC device (not shown) provided at the NC machine toolcontrols the operation of the NC machine tool in accordance with theseries of machining programs received from the automatic programmingapparatus 10. The automatic programming apparatus 10, for example, canbe used well in a multi-axis, multi-line control type NC lathe centrallyplacing a plurality of spindles and a plurality of tool rests on acommon bed and designed to enable simultaneous machining of the samematerial by different types of processes or simultaneous machining ofdifferent materials by turning tools, drills, mills, and other cuttingtools. In this embodiment, the routine for automatic production ofmachining programs in such a multi-axis, multi-line control NC lathewill be explained as an example.

As shown in FIG. 1, the automatic programming apparatus 10 is providedwith an input unit 12, a display unit 14, a control unit 14, a storageunit 18, a cutting condition determination processing unit 20, and aprogram generation processing unit 22. Explained generally, the inputunit 12 has a keyboard with not shown numeric keys or a mouse or otherpointing device and is designed to enable an operator to giveinstructions by a dialog format or input data for various selectionitems or required items on various screens displayed on the display unit14, described later. Further, the input unit 12 has a graphic inputfunction like a CAD system and is designed to allow an operator to inputgeometric data of a machined product by a drawing format. The displayunit 14 has a not shown CRT or LCD or other display and enables input bya dialog format or input of drawings by an operator by selectivelydisplaying various types of screens relating to various data or tablesexplained later stored in the storage unit 18 and by displaying themachining programs automatically produced in accordance with the laterexplained routine.

The control unit 16 for example has a not shown computer CPU andcontrols all sorts of operations relating to the automatic production ofprograms in the automatic programming apparatus 10 such as making thestorage unit 18 store the various types of instructions or data input bythe input unit 12, making the display unit 14 suitably display theabove-mentioned various types of screens, and making the cuttingcondition determination processing unit 20 and the program generationprocessing unit 22 execute the various processing explained later. Thestorage unit 18 has a ROM, ROM, floppy disk, or other external storagemedium of a not shown computer, stores in advance the various types ofdata, tables, screens, etc. explained later relating to automaticproduction of programs, and stores the tables input by the input unit 12and the automatically produced machining programs. The cutting conditiondetermination processing unit 20 and program generation processing unit22 can be configured by a CPU of a not shown computer, transfer data andinstructions between each other and with the input unit 12, display unit14, and storage unit 18, and generate desired machining programs underthe control of the control unit 16.

Explaining this in more detail, the storage unit 18 stores in advancevarious types of tables such as a cutting condition data table settingand registering a plurality of sets of standard cutting condition datarelating to cutting conditions required in the plurality of types ofcutting processes able to be executed in the NC machine tool for thedifferent types of the cutting processes and for the different types ofthe plurality of types of materials of the workpieces, a tool data table26 registering a plurality of sets of tool data relating to theattributes of the plurality of types of tools able to be used in theplurality of types of cutting processes, and an algorithm table 28setting and registering a plurality of program generating algorithms forgenerating machining programs for executing a plurality of types ofcutting processes for the different types of the cutting processes. Thestorage unit 18 further stores in advance, in relation to these types oftables, a material designating screen 30 displaying names of a pluralityof types of material of workpieces in a designatable format, a processdesignating screen 32 for displaying names of various types of cuttingprocesses in a designatable format, and a tool designating screen 34 fordisplaying names of a plurality of various types of tools in adesignatable format. These various types of screens are selectivelydisplayed on the display of the display unit 14 under the control of thecontrol unit 16.

The input unit 12 receives various commands including selection anddesignation of the type of material of the workpiece, the types of theat least one cutting process to be performed on the workpiece, and thetypes of tools to be used in the at least one cutting processes throughan input operation of the operator through the keyboard etc. on thevarious types of screens displayed on the display by the display unit14. The various commands received by the input unit 12 are suitablyhandled for determining the cutting conditions at the cutting conditiondetermination processing unit 20 and for generating the machiningprograms at the program generation processing unit 22 under the controlof the control unit 12 as explained below.

That is, the cutting condition determination processing unit 20specifies and reads the standard cutting condition data required for theat least one cutting process in the cutting condition data table 24stored in the storage unit 18 from the type of material of the workpieceand the types of the at least one cutting process designated by theinput unit 12, specifies and reads the tool data corresponding to thetypes of the tools designated by the input unit 12 in the tool datatable stored in the storage unit 18, and finalizes the cuttingconditions relating to the designated material and tools from the readstandard cutting condition data and tool data. Further, the programgeneration processing unit 22 specifies and reads the program generationalgorithms corresponding to the at least one cutting process designatedby the input unit 12 in the algorithm table 28 stored in the storageunit 18 and generates the machining programs for the at least onecutting process based on the cutting conditions determined at thecutting condition determination processing unit 20 in accordance withthe read program generation algorithms.

Next, a specific example of the automatic programming apparatus 10 andthe automatic programming executed there will be explained withreference to the flow charts shown in FIG. 2A and FIG. 2B and thevarious types of screens shown in FIG. 3 to FIG. 11.

An NC lathe using the automatic programming apparatus 10 for example canexecute various processes roughly divided in the four categories ofbasic processes (cut-off, separation, etc.), turning processes (outerdiametrical (OD) turning, rough machining, end drilling, OD threading,inner diametrical (ID) turning, etc.), secondary processes (crossdrilling, eccentric drilling, D-cutting, key grooving, etc.), specialprocesses (long workpiece, re-chucking set, etc.) Further, in thisexample, the materials of the bars which can be machined by an NC latheare roughly divided according to the differences in the cuttingconditions required (cutting speed, feed rate, etc.) into aluminum andbrass, fast cutting steel and carbon tool steel, fast cutting stainlesssteel and structural carbon steel, and alloy tool steel andnickel-chromium steel, and hard cutting materials. Note that theseprocess classifications and material classifications are set by the userin routine machining work in accordance with the machine configurationof the NC machine tool and products covered. In the automaticprogramming apparatus 10, these classifications can be freely changedand added at the user side.

First, at step S1 of the flow charts of FIG. 2A and FIG. 2B, the controlunit 16 selects the material of the bar covered from the five types ofmaterials stored in advance in the storage unit 18 in accordance withthe designation of the material made after the user operates the inputunit 12 to make the display of the display unit 14 display the materialdesignating screen 30. The material designating screen 30 has the screenconfiguration shown in FIG. 3 and is designated to not only enable thematerial of the covered bar in the NC lathe to be designated, but alsoenable the shape, dimensions, and other supplementary data of the bar tobe designated by the user suitably operating the input unit 12 whilereferring to the material designating screen 30. In the illustratedexample, a round material (outer diameter: 12 mm) comprised of aluminumor brass is designated. The material of the selected bar and thedesignated supplementary data are stored in the storage unit 18.

Next, at step S2, the control unit 16 selects the processes required formachining the bar of the material selected at step S1 to produce themachined product from the various processes stored in advance in thestorage unit 18 in accordance with the designation of the processesafter the user operates the input unit 12 to make the display of thedisplay unit 14 display the process designating screen 32. The processdesignating screen 32 has the screen configuration shown in FIG. 4A andFIG. 4B and is designed to roughly divide the names of all processesable to be executed by the NC lathe into the above four classificationsand enable them to be displayed in a list for each classification and toenable display of the list for each classification by the operatorsuitably operating the input unit 12 while referring to the processdesignating screen 32. For example, in FIG. 4A, basic processes aredesignated as the main classification, and the corresponding three typesof basic processes are displayed in a list. Further, in the example ofFIG. 4B, turning processes are selected as the main classification, thecorresponding 16 types of turning processes are displayed in a list, andthe OD turning process is designated among them. The type of theselected process is stored in the storage unit 18.

At step S2, it is possible to select a plurality of processes requiredfor machining one machined product. At this time, the operator reads thetypes of processes required for the machining and their order ofexecution from the design drawings of the machined product andsuccessively designates the processes on the process designating screen32 in accordance with that order of execution. The plurality ofprocesses designated in this way are stored in the storage unit 18 foreach designation and preferably are listed on the process list screen 36stored in advance in the storage unit 18 and displayed on a list in thedisplay of the display unit 14 at any time. The process list screen 36has the screen configuration shown in FIG. 5. In this example, all ofthe processes required for machining a single machined product arelisted. Further, as illustrated, it is possible to configure the systemso that each time a desired process (in the figure, the ninth facedrilling) is designated, the following tool designating screen 34 isdisplayed if the tool selection of that process is not completed.

Next, at step S3, the control unit 16 selects the tools required at theprocesses selected at step S2 from the tool data table 26 stored inadvance in the storage unit 18 in accordance with the designation of thetools made after the operator operates the input unit 12 to display thetool designating screen 34 on the display of the display unit 14. Inthis case, the system is configured so that each time one process isselected at step S2, the tool designating screen 34 for the typicaltools required for that process is automatically displayed. This isadvantageous in the point of enabling the input work to be speeded upand maintaining the train of thought of the operator. The tooldesignating screen 34 has the screen configuration shown in FIG. 6 andselectively displays the names of types and attributes of all toolsregistered in the tool data table 26 along with representative drawingsillustrating the tools by the operator suitably operating the input unit12 while referring to the tool designating screen 34. Here, the tooldata table 26 can describe the names of the tools given by the user sidefor convenience (for example, to clarify the material) as registerednames in relation to the names of types of tools (OD turning tool, IDturning tool, threading turning tool, drill, end mill, tap, etc.) andregister the shape of the nose, dimensions, or other attributes for eachregistered name. In the illustrated example, “drill” is selected as thename of the type (or automatically selected by selection of the drillingprocess at step S2), the drill screen is displayed, the drill of theregistered name DSC-2.2 is designated, and its attributes (diameter andangle of cut) are displayed.

In this way, at the stage where the selection of the material of thebar, processes, and tools is completed, the control unit 16automatically selects the standard cutting conditions (nose position ofstart point, in-feed, etc.) required for executing the cuttingdesignated by the operator and displays them on the display unit 14 foreach designated process so as to enable confirmation by the operator(step S4). For that purpose, the storage unit 18 stores in advance astandard machining condition table 38 (FIG. 1) setting and registering aplurality of standard machining conditions required in the aboveplurality of types of cutting processes for each type of the cuttingprocess. The standard machining conditions registered in the standardmachining condition table 38 are the standard data derived fromexperience relating to cutting processes in the NC lathe covered. Ifthese are used, it is possible to produce programs for executingstandard machining. This automatic display of the standard machiningconditions is effective in streamlining the work of the operator ininputting data.

Here, it is preferable that the user side can freely change the standardmachining conditions so as to enable the user to make use of its knowhow and impart some sort of added value to the standard machiningprograms.

Further, generally, it is necessary to register supplementary data (suchas depth of hole in drilling, type of thread in threading, etc.)corresponding to the types of the cutting processes in addition to thesestandard machining conditions. From this viewpoint, in the illustratedembodiment, the standard machining conditions selected in the standardmachining condition table 38 in accordance with the type of thedesignated process are displayed in a changeable manner, and a pluralityof types of data input screens 40 (FIG. 1) are stored in advance in thestorage unit 18 for enabling registration of the supplementary datarequired individually corresponding to the types of the designatedprocesses. Further, the input unit 12 is designed to accept changes inthe standard machining conditions according to need and acceptregistration of supplementary data in accordance with request.

Therefore, at step S4, the display of the display unit 14 displays thedata input screen 40 displaying the standard machining conditionscorresponding to the designated process under the control of the controlunit 16. As opposed to this, the operator operates the input unit 12 inaccordance with need while referring to the data input screen 40 tochange the displayed standard machining conditions or register therequested supplementary data on the data input screen 40 (step S5). Thedata input screen 40 has the screen configuration shown in FIG. 7 toFIG. 9 for example. For example, FIG. 7 shows the data input screen 40Acorresponding to OD turning, OD grooving, rough machining, and otherturning processes on the outer circumference of the bar. In the datainput screen 40A, the nose position of the start point, in-feed, etc.are displayed changeably as standard machining conditions, butsupplementary data is not registered. Here, in this turning process,registration of the outer shape of the machined product, that is, thecutting shape, as supplementary data is advantageous in many cases.Therefore, the input unit 12 is given a drawing input function like aCAD system and the storage unit 12 stores in advance a drawing inputscreen 40B shown in FIG. 8. Due to this, the operator can in accordancewith need make the display unit 14 display the drawing input screen 40Band register geometric supplementary data (point coordinates on toolpath, radius of arc, etc.) from the drawings. Further, the example ofFIG. 9 shows a data input screen 40C corresponding to the D-cutting. Inthe data input screen 40C, the outer diameter of the machined part, themaximum in-feed, the cut length, etc. are displayed changeably asstandard machining conditions. Further, the number of cuts, therotational angle of the spindle at the time of cutting, the cut width,the cut start position (Z-coordinate), and the amount of cut (depth) areregistered as supplementary data.

Once the confirmation and change of the machining conditions and theregistration of the supplementary data are completed in this way, asexplained above, the cutting condition determination processing unit 20determines the cutting conditions relating to the designated bar anddesignated tools under the control of the control unit 16 (step S6).Here, in the illustrated embodiment, as shown in the following Table 1to Table 4, the cutting condition data table 24 sets and registers thedata of the relative cutting speed between the cut point of the bar andthe nose of the tool and the data of the relative feed per revolutionduring the cutting between the bar and tool as the standard cuttingcondition data for each type of the various cutting processes explainedabove and for each of the five types of materials explained above.

For example, Table 1 and Table 2 are a cutting speed table and feed ratetable in OD turning, OD grooving, rough machining, or other turning onthe outer circumferential surface of the bar. In this example, the feedrate table is divided in data in accordance with the in-feed for each ofthe feed per revolution in the radial direction and feed per revolutionin the longitudinal direction.

TABLE 1 OD cutting speed table Cutting speed Type of material (m/min)Aluminum, brass 200.0 Free cutting steel, carbon tool steel 150.0 Freecutting stainless steel, structural 120.0 carbon steel Alloy tool steel,nickel-chromium steel 70.0 Hard cutting materials 50.0

TABLE 2 OD feed rate table Feed (mm/rev) More than 4 mm 2 to 4 mm Lessthan 2 mm Type of in-feed in-feed in-feed material Radial Long. RadialLong. Radial Long. Aluminum, 0.03 0.03 0.05 0.08 0.08 0.15 brass Freecutting 0.015 0.03 0.03 0.08 0.06 0.15 steel, carbon tool steel Freecutting 0.015 0.03 0.025 0.05 0.05 0.1 stainless steel, structuralcarbon steel Alloy tool 0.01 0.03 0.02 0.05 0.03 0.1 steel, nickel-chromium steel Hard cutting 0.008 0.02 0.015 0.04 0.02 0.08 materials

Further, Table 3 and Table 4 respectively are a cutting speed table andfeed rate table in a drilling process for the end face or the outercircumferential surface of a bar such as face drilling, cross drilling,or eccentric drilling. In this example, both the cutting speed table andthe feed rate table are divided in data accordance with the diameterdimensions of the tools (drills). Further, the feed rate table showsdata of not the feed per revolution itself, but two coefficients.

TABLE 3 Drill cutting speed table Cutting speed (m/min) Drill DrillDrill diameter of diameter of diameter of Type of material more than 5mm 2 to 5 mm less than 2 mm Aluminum, brass 80.0 70.0 50.0 Free cuttingsteel, 60.0 50.0 35.0 carbon tool steel Free cutting 40.0 35.0 25.0stainless steel, structural carbon steel Alloy tool steel, 15.0 12.010.0 nickel-chromium steel Hard cutting 10.0 9.0 8.0 materials

TABLE 4 Drill feed rate (coefficient) table Drill diameter of Drilldiameter Drill diameter Type of more than 5 mm of 2 to 5 mm of less than2 mm material Coeff. 1 Coeff. 2 Coeff. 1 Coeff. 2 Coeff. 1 Coeff. 2Aluminum, 0.0185 0.0275 0.02 0.02 0.03 0 brass Free cutting 0.01430.0285 0.0167 0.0166 0.025 0 steel, carbon tool steel Free cutting0.0114 0.023 0.0133 0.0134 0.02 0 stainless steel, structural carbonsteel Alloy tool 0.0086 0.017 0.01 0.01 0.015 0 steel, nickel- chromiumsteel Hard cutting 0.0057 0.0115 0.067 0.066 0.01 0 materials

The cutting conditions determined from the above standard cuttingcondition tables (cutting speed and feed rate) are the rotational speedof the spindle turning the bar being worked in the NC lathe and therelative feed per revolution during cutting between the bar and toolwhen the type of the cutting designated by the input unit 12 is turningand the type of the designated tool is a turning tool. Further, when thetype of the cutting designated by the input unit 12 is milling ordrilling and the type of the designated tool is a rotary tool, they arethe rotational speed of the rotary tool and the relative feed perrevolution during cutting between the rotary tool and the bar. Amongthese cutting conditions, the rotational speed of the spindle or rotarytool are found by predetermined calculations based on the cutting speeddata registered in the cutting condition data table 24, while therelative feed rate between the tool and bar is either the feed rate dataregistered in the cutting condition data table 24 as it is or iscalculated by predetermined calculation based on the feed rate data.

Therefore, in the illustrated embodiment, a cutting conditioncalculation expression table 42 setting and registering cuttingcondition calculation expressions for calculating the cutting conditionsfrom the standard cutting condition data and tool data for each of thetypes of the plurality of types of cutting processes is stored inadvance in the storage unit 18. Further, the cutting conditiondetermination processing unit 20, at the same time as reading the tooldata and the standard cutting condition data as explained above,specifies and reads the cutting condition calculation expressionscorresponding to the cutting processes designated by the input unit 12in the cutting condition calculation expression table 42 andautomatically determines the cutting conditions in accordance with theread cutting condition calculation expressions.

For example, in OD turning, OD grooving, rough machining, and otherturning processes on the outer circumferential surface of a bar, thespindle speed and feed rate are determined as the cutting conditions.Therefore, the cutting condition calculation expression table 42 storesS=V/(π×d)×100 as the cutting condition calculation expressioncorresponding to these turning processes. Here, “S” indicates the speedof the main spindle, “V” the cutting speed data (Table 1) registered inthe cutting condition data table 24, and “d” the outer diameter of thecut portion of the bar before cutting. Further, the feed rate uses thefeed rate data (Table 2) registered in the cutting condition table 24.In this case, the feed rate data used differs in accordance with thein-feed automatically displayed (or if necessary registered for achange) at the data input screen 40A (FIG. 7).

Further, in end drilling, cross drilling, eccentric drilling, and otherdrilling of the end face or the outer circumferential surface of thebar, the spindle speed (in case of a fixed tool) or the tool speed (inthe case of a rotary tool) and feed rate are determined as the cuttingconditions. Therefore, the cutting condition calculation expressiontable 42 stores S=V/(π×d)×100 as the cutting condition calculationexpression corresponding to these drilling. Here, “S” indicate thespindle speed or the tool speed, “V” the cutting speed data registeredin the cutting condition data table 24 (Table 3), and “d” the tooldiameter (registered for each registered tool name in tool data table26). In this case, different cutting speed data “V” is used inaccordance with the diameter of the designated tool. Further, thecutting condition calculation expression table 42 stores F=d×k1+k2 asanother cutting condition calculation expression corresponding todrilling. Here, “F” indicates the feed rate, “d” the tool diameter, andk1 and k2 the coefficient 1 and coefficient 2 of the feed rate data(Table 4) registered in the cutting condition data table 24. Differentfeed rates (coefficients) are also used in accordance with the diameterof the designated tools.

The above cutting conditions generally differ somewhat according to thedifferences in materials, dimensions, etc. of the designated tool, so toproduce high accuracy machining programs, it is preferable to be able todetermine the optimal cutting conditions for the attributes of tools.Therefore, in the illustrated embodiment, a parameter table 44 settingand registering standard parameters for adjusting the standard cuttingcondition data corresponding to the attributes of the tools (registeredfor each registered tool name in the tool data table 26) for eachattribute of the tools and type of material of the machined bars isstored in advance in the storage unit 18. The standard parameters areratios (percentages) for adjusting the above standard cutting conditiondata (cutting speed, feed rate) in accordance with the attributes of thetools and are standard data derived from experience relating to theindividual cutting processes in the NC lathe covered. Therefore, bymultiplying the standard parameters with the cutting conditionscalculated in accordance with the cutting condition calculationexpressions, it is possible to determine the optimal cutting conditionsfor the attributes of tools.

Table 5 is an example of a standard parameter table for adjusting thestandard cutting condition data (cutting speed, feed rate) in drillingdescribed in the above Table 3 and Table 4. In this example, ratios(percentages) for adjusting the cutting speed and feed rate for twotypes of drills with different attributes, that is, the registered namesDSC-2.2 and DSC-3.0, are defined for each material of the bar.Therefore, in the illustrated embodiment, the cutting conditiondetermination processing unit 20 specifies and reads the standardparameters required for the cutting processes designated by the inputunit 12 from the type of material of the workpiece designated by theinput unit 12 and the attributes of the tools in the standard parametertable 44 stored in the storage unit 18 and determines the cuttingconditions using the read standard parameters.

TABLE 5 Drill ratio table Registered Cutting Feed rate name Type ofmaterial speed (%) (%) DSC-2.2 Aluminum, brass 100.0 100.0 Fast cuttingsteel, carbon 100.0 100.0 tool steel Fast cutting stainless steel, 95.090.5 structural carbon steel Alloy tool steel, nickel- 92.3 90.0chromium steel Hard cutting materials 90.5 90.0 DSC-3.0 Aluminum 98.2100.0 Fast cutting steel, carbon 97.5 100.0 tool steel Fast cuttingstainless steel, 95.0 90.5 structural carbon steel Alloy tool steel,nickel- 90.3 90.0 chromium steel Hard cutting materials 80.0 90.0

In this way, when the cutting conditions are determined at step S6, atstep S7 the program generation processing unit 22 generates a machiningprogram of the designated cutting process in accordance with the programgeneration algorithm as explained above. In the illustrated embodiment,the program generation processing unit 22 generates the machiningprogram using the standard machining condition data required by thedesignated cutting process (stored in standard machining condition datatable 38 or changed at data input screen 40 (step S5)) and supplementarydata (registered at data input screen 40 (step S5)). Here, as an exampleof the program generation algorithm registered at the algorithm table28, a program generation algorithm in OD turning, OD grooving, roughmachining, and other turning for the outer circumferential surface of abar will be explained simply.

In turning on the outer circumference of a bar, the standard machiningcondition data and supplementary data are registered by the data inputscreens 40A and 40B shown in FIG. 7 and FIG. 8 and the cuttingconditions (spindle speed and feed rate) are determined by theabove-mentioned routine. Therefore, the program generation processingunit 22 generates a block of commands for making the spindle of the NClathe rotate in accordance with the cutting conditions in the initialstep of a program generation algorithm. At the next step, it generates ablock of commands for positioning the nose at the position of (X,Y)=(bardiameter+1 mm, Z-coordinate of machining start point). At the next step,it generates a block of commands for positioning the nose at themachining start point. At the next step, it generates a block ofcommands for making the nose move for cutting along the shape drawn bythe drawing input screen 40B. Further, at the final step, it generates ablock of commands for positioning the nose at a machining end pointafter cutting to the end point of the drawing. In this way, a machiningprogram for an outer circumferential turning is automatically produced.Note that in this program generation algorithm, the machining startpoint is determined by several methods defined in accordance with thepresence of any face cutting margin or the position of the end point ofthe drawing. Similarly, the machining end point is determined by severalmethods defined in accordance with the position of the end point of thedrawing.

The machining program produced at step S7 is described on the programscreen 46 (FIG. 1) stored in advance in the storage unit 18 anddisplayed on the display of the display unit 14. The program screen 46has the screen configuration shown in FIG. 10 and preferably isdisplayed on the display of the display unit 14 in parallel with theprocess list screen 36 and the data input screen 40. In the illustratedexample, “face drilling” is designated at the processing list screen 36,and a data input screen 40 corresponding to the face drilling and aprogram screen 46 describing the drilling program are displayed. Theoperator can refer to the program screen 46 displayed on the displayunit 14 and judge the appropriateness of the produced machining program.

Here, the machining program produced at step S7 can be adoptedimmediately as it is and sent to the NC device, but in practice it isadvantageous for the operator for example to compare it with itsexperience and judge the appropriateness while referring to the programscreen 46 and then if necessary correct the machining program. From thisviewpoint, in the illustrated embodiment, it is possible to configurethe system so that the input unit 12 can accept changes in the cuttingconditions determined at step S6 if necessary and so that the programgeneration processing unit 22 can correct the machining program producedat step S7 in accordance with the changes in the cutting conditionsaccepted at the input unit 12. Further, the storage unit 18 stores thecondition changing screen 48 (FIG. 1) for changing the cuttingconditions in advance.

Therefore, when the operator judges the correction of the machiningprogram is necessary by referring to the program screen 46, at step S8,it operates the input unit 12 to make the display of the display unit 14display the condition changing screen 48 and changes the cuttingconditions determined for the designated material and the designatedtool on the condition changing screen 48 to the desired content. Thecondition changing screen 48 has the screen configuration illustrated inFIG. 11. In the illustrated example, the standard cutting conditions(spindle speed, feed rate, chamfering) determined by the machiningcondition of an in-feed of at least 4 mm when performing OD turning byan OD cutting tool on a bar of aluminum or brass (outer diameter: 12 mm)are displayed. The operator can change any item of the cuttingconditions on the condition changing screen 48 to any values through theinput unit 12. Further, the program generation processing unit 22generates a corrected machining program based on the changed cuttingconditions.

It is expected that such correction of a machining program automaticallyproduced by the automatic programming apparatus 10 would generally beperformed by an operator having a high level of knowledge or experience.Therefore, when an operator having little knowledge or experience nexttries to produce a similar machining program by the automaticprogramming apparatus 10, it would be advantageous if it could easily(preferably without being aware of it) re-use the values of the cuttingconditions changed by the previous operator. From this viewpoint, in theillustrated embodiment, the control unit 16 is configured to judge atstep S9 if the cutting conditions were changed at step S8 and, only whennot changed, end the flow of automatic production of the program.Further, when the cutting conditions were changed, at step S10, thecontrol unit 16 makes the cutting condition determination processingunit 20 calculate changing parameters so as to enable it to determinethe changed cutting conditions changed by the operator at step 58 forcorrecting the machining program from the standard cutting conditiondata registered in the cutting condition data table 24 and stores thechanging parameters in the storage unit 18 for each attribute of thetools and for each type of material of the workpiece.

The changing parameters are ratios (percentages) for adjusting thestandard cutting condition data (cutting speed, feed rate) in accordancewith the attributes of the tools in the same way as the standardparameters registered in the standard parameter table 44 in the storageunit 18. Therefore, the calculated changing parameters are preferablyrewritably registered in the standard parameter table 44 while storingthe preregistered standard parameters. Further, each time the automaticprogramming apparatus 10 automatically produces a machining program, thecutting condition determination processing unit 20 judges if changingparameters able to be specified from the attributes of the tools and thetype of material of the workpiece designated by the operator areregistered in the standard parameter table 44 under the control of thecontrol unit 16. When registered, it determines the cutting conditionsusing the changing parameters instead of the standard parameters able tobe specified by the same attributes of tools and type of material of theworkpiece. By this configuration, when another operator next produces asimilar machining program, it is able to reuse the changed cuttingconditions, that is, the values of the cutting conditions changed by theprevious operator at the time of automatically producing a machiningprogram, without being aware of this at all. Such changing parametersenable greater improvement in accordance with the knowledge andexperience of the operator by enabling constant rewriting.

Further, it is also possible to configure the system so that, whendetermining the cutting conditions, if changing parameters able to bespecified by the attributes of the tools and type of material of theworkpiece the same as the required standard parameters are registered inthe standard parameter table 44, the operator is able to suitably selecteither of the cutting conditions determined using the standardparameters or the cutting conditions determined using the changingparameters through the input unit 12. By doing this, another operatorcan initiate automatic programming after judging the appropriateness ofthe cutting conditions changed by the previous operator. Further, it isalso possible to design the system so that, in the above flow, whendesiring to correct a machining program automatically produced by theprogram generation processing unit 22, correction items can be directlyinput to the data input screen 40 and program screen 46 shown in FIG.10. In this case, if differentiating registration of changes of cuttingconditions using the condition changing screen 48 and preventingcalculation and registration of changing parameters in the flow, itbecomes possible to deliberately conceal the knowhow of individualoperators.

As explained above, according to the automatic programming apparatus 10,at the stage of reading the processes required for machining from thedesign drawings of the machined product, the operator can successivelydesignate required processes and also designate the tools and registerthe required data after designation of the processes, so can perform thework of input smoothly without any interruption in its train of thought.Further, since the standard machining conditions required for cuttingprocesses are registered in advance, the amount of data to be registeredcan be kept small. Further, since the standard cutting conditions can beautomatically determined in accordance with the material of theworkpiece and the attributes of the tools, there is the advantage thateven an operator with poor programming skill or knowledge of themachining processes can initiate automatic programming relatively easilyin a short time. Further, since the automatically produced machiningprogram can be suitably corrected in accordance with the experience ofan operator and the corrected content stored and used by otheroperators, the advanced programming skill based on its high level ofknowledge and experience can be shared by a large number of operators.Therefore, according to the automatic programming apparatus 10, it ispossible to quickly and accurately automatically produce a series ofmachining programs for automatically machining complicated and diverseshapes of products without being affected by the level of knowledge orexperience of the operator.

As clear from the above explanation, according to the present invention,there are provided an automatic programming apparatus and automaticprogramming method for automatically producing machining programs to beexecuted by an NC machine tool which enable a series of machiningprograms for automatically machining complicated and diverse shapes ofproducts by a multiple function machining type NC machine tool quicklyand accurately without being affected by the level of knowledge orexperience of the operator.

FIG. 12 is a block diagram of an automatic programming apparatus 50according to a second embodiment of the present invention. The automaticprogramming apparatus 50 executes the automatic programming methodaccording to the present invention and automatically produces amulti-line control program to be executed by a not shown NC machine toolhaving at least one spindle able to be driven under the control of aplurality of lines and at least one tool rest. The NC device (not shown)mounted in the NC machine tool controls the operation of the NC machinetool in accordance with the multi-line control program received from theautomatic programming apparatus 50.

As shown in FIG. 12, the automatic programming apparatus 50 is providedwith an input unit 52, display unit 54, control unit 56, storage unit58, and program allocation processing unit 60. Explained generally, theinput unit 52 has a not shown keyboard with numeric keys or a mouse orother pointing device and is designed to allow the operator to issueinstructions by a dialog format or input data while referring to variousscreens explained later displayed on the display unit 54. The displayunit 54 has a not shown CRT, LCD, or other display, selectively displaysvarious screens relating to various data explained later stored in thestorage unit 58 to enable input by the operator by a dialog format, anddisplays the multi-line control program automatically produced inaccordance with a later explained routine.

The control unit 56 has for example a not shown computer CPU andcontrols all sorts of operations relating to the automatic production ofthe multi-line control program in the automatic programming apparatus 50such as making the storage unit 58 store various types of instructionsor data input by the input unit 52, making the display unit 54 suitablydisplay various types of screens explained above, and making the programallocation processing unit 60 execute various processing explainedlater. The storage unit 58 for example has a not shown computer ROM orRAM or floppy disk or other external storage medium, stores in advancethe various data, screens, etc. explained later relating to automaticproduction of a multi-line control program, and stores data input by theinput unit 52 and the automatically produced multi-line control program.The program allocation processing unit 60 can be configured by forexample a not shown computer CPU, transfer data and instructions withthe input unit 52, display unit 54, and storage unit 58, and generatethe desired multi-line control program.

Explained in more detail, the storage unit 58 stores in advance aplurality of programs 62 individually produced without consideration ofallocation to the plurality of lines for control of the plurality ofprocesses required for producing a machined product by an NC machinetool, tool data 64 relating to the attributes of a plurality of types oftools able to be used in a plurality of types of cutting processes ableto be executed by the NC machine tool, tool mount data 66 relating tothe positions of a plurality of tool mounts on a tool rest provided onat least one tool rest of the NC machine tool, tool holder data 68relating to the attributes of a plurality of types of tool holders ableto be attached on the plurality of tool mounts, and tool managementdetermining algorithms 70 for allocating attachment locations of theplurality of designated tools designated by programs 62 to the pluralityof tool mounts assuming several of the plurality of programs 62 will beexecuted in parallel by a least two lines of the plurality of lines.

Further, under the control of the control unit 56, the programallocation processing unit 60 performs processing in accordance with atool management determining algorithm 70 stored in the storage unit 58so as to specify as the attachment locations of the plurality ofdesignated tools a plurality of tool mounts able to execute the programs62 relating to the designated tools out of the plurality of tool mountsbased on the tool data 64 and tool mount data 66 stored in the storageunit 58, select the plurality of tool holders to be used for attachingthe corresponding plurality of designated tools of the specifiedplurality of tool mounts based on the tool data 64 and the tool holderdata 68 stored in the storage unit 58, describe the commands fordesignating the specified plurality of tool mounts in the plurality ofprograms 62 stored in the storage unit 58 after completion of selectionof the plurality of tool holders, and automatically allocate theprograms 62 to the plurality of lines.

Explaining the configuration of the above automatic programmingapparatus 50 in more detail, first, the configuration of amulti-spindle, multi-line control type NC lathe will be generallyexplained with reference to FIG. 13 as an example of an NC machine toolable to use the automatic programming apparatus 50.

This NC lathe is provided with a main (or front) first spindle 72securely holding and rotating a bar supplied from outside the lathe, asupplementary (or back) second spindle 74 able to be arranged facing thefirst spindle 72 coaxially in the axial line direction and securelyholding and rotating a partially machined bar transferred from the firstspindle 72, first and second tool rests 80 and 82 carrying pluralitiesof tools 76 and 78 and operating independently, and a third tool rest 84carrying a plurality of tools 78 and arranged in a fixed manner. In thisNC lathe, the first spindle 72, second spindle 74, first tool rest 80,and second tool rest 82 operate under the control of three linesexplained later. Due to this, various types of automatic machiningincluding simultaneous machining are executed.

The first spindle 72 is configured to move linearly along a feed controlaxis (Z1 axis) parallel to its own axis of rotation 72 a. At apredetermined position in front of the first spindle 72 in the axialdirection, a guide bush 86 is placed coaxially with respect to the firstspindle 72 as a supplementary support device supporting the bar securelyheld at the first spindle 72 near the length to be machined of its frontend.

The first tool rest 80 is arranged near the side of the guide bush 86 infront of the first spindle 72 in the axial direction and is configuredto move linearly along a feed control axis (X1 axis) perpendicularlyintersecting an X1 axis of the first spindle 72 and a feed control axis(Y1 axis) perpendicularly intersecting the Z1 axis and X1 axis. Thefirst tool rest 80 is a so-called gang tool rest (or flat turret)provided with a plurality of tool mounts 88 for arranging and holding inparallel the plurality of tools 76 and 78 and can carry turning tools,drills and other turning tools as well as mills and other rotary toolsin arrangements able to be positioned perpendicular to the axis ofrotation 72 a of the first spindle 72. The first tool rest 80 basicallycan make the noses of the desired tools 76 and 78 allocated and selectedby its own Y1 axial movement controlled by the first line operatecomplementarily in accordance with an NC program by co-action betweenthe X1 axial movement of the first tool rest 80 itself and Z1 axialmovement of the first spindle 72 controlled by the same first line andthereby perform the desired cutting process on the bar securely held bythe first spindle 72. Note that the Y1 axial movement of the first toolrest 80 functions not only as tool selection movement, but also cutting(D-cut) movement of the outer circumference of the bar when for exampleselecting a rotary tool. Further, a predetermined tool mount 88 of thefirst tool rest 80 can carry drilling tools or rotary tools using aplurality of types of not shown tool holders.

The second tool rest 82 is arranged at the substantially opposite sideto the first tool rest 80 across the guide bush 86 and is configured tomove linearly along the feed control axis (X2 axis) perpendicular to theZ1 axis of the first spindle 72 and the feed control axis (Z2 axis)parallel to the Z1 axis. The second tool rest 82 is a so-called turrettool rest provided with a plurality of tool mounts 90 for holding aplurality of tools 76 in an arrangement at equal intervals in thecircumferential direction. It has a rotation indexing control axis (T1axis) parallel to the Z2 axis and can carry turning tools, drills andother turning tools as well as mills and other rotary tools in anarrangement able to be positioned to be perpendicular or parallel to theaxis of rotation 72 a of the first spindle 72. The second tool rest 82basically can make the noses of the desired tools 76 and 78 allocatedand selected by its own T1 axial rotation controlled by the second lineoperate complementarily in accordance with an NC program by co-actionbetween the X2 axial movement and Z2 axial movement of the second toolrest 82 itself controlled by the same second line and thereby performthe desired cutting process on the bar securely held by the firstspindle 72.

The tool mounts 90 of the second tool rest 82 can carry various types oftools 76 and 78 using a plurality of types of tool holders 92. At thistime, depending on the configuration of the tool holder 92, it ispossible to attach a pair of tools on one tool mount 90 oriented toenable simultaneous machining of both a bar securely held by the firstspindle 72 and a bar securely held by the second spindle 74.

The second spindle 74 has an axis of rotation 74 a parallel with theaxis of rotation 72 a of the first spindle 72, is arranged in front ofthe first spindle 72 in the axial direction to be able to face it acrossa guide bush 86, and is configured to move linearly along a feed controlaxis (X3 axis) perpendicular to the Z1 axis of the first spindle 72 anda feed control axis (Z3 axis) parallel to the Z1 axis. As opposed tothis, the third tool rest 84 has the configuration of a gang tool restprovided with a plurality of tool mounts 94 for holding a plurality oftools 78 in a parallel arrangement, carries drills and other turningtools or end mills and other rotary tools in an arrangement able to bepositioned parallel to the axis of rotation 74 a of the second spindle74, and is arranged facing the X3 axis movement path of the secondspindle 74. Note that the third tool rest 84 can be called for example a“Back 3” type from its configuration. The second spindle 74 basicallyselects the desired tool 78 on the third tool rest 84 by its own X3axial movement controlled by the third line, can make the nose of thetool 78 operate relatively complementarily in accordance with the NCprogram, and thereby perform the desired cutting process on the bartransferred from the first spindle 72 to the second spindle 74. Notethat the tool mounts 94 of the third tool rest 84 can carry drillingtools or rotary tools using a plurality of types of not shown toolholders.

Further, the first spindle 72 and the second spindle 74 can be providedwith rotational angle control axes (C1 axis and C2 axis). Therefore, thefirst and second spindles 72 and 74 perform various types of machiningusing the rotary tools carried at the desired tool rests 80, 82, and 84at desired positions on the end face or outer circumferential surface ofthe bars held there by positioning and indexing operations of the C1axis and C2 axis.

In this way, the above-mentioned NC lathe can control the operations ofthe spindles 72 and 74 and the tool rests 80, 82, and 84 along the largenumber of control axes in accordance with a three-line control programso as to simultaneously use as many as three tools 76 and 78 selected onthe three tool rests 80, 82, and 84 and automatically machine barssecurely held by the two spindles 72 and 74.

Next, a specific example of the automatic programming apparatus 50 andthe automatic programming method executed there will be explained inrelation to the above NC lathe while referring to the flow charts shownin FIG. 14A and FIG. 14B, the example of machining a product shown inFIG. 15, and the various types of display screens shown in FIG. 16 toFIG. 22.

First, at step P1 of the flow charts of FIG. 14A and FIG. 14B, theoperator reads the plurality of processes required for producing amachined product on an NC lathe from the design drawings of the machinedproduct and produces a plurality of programs 62 for controlling theseprocesses separately without considering allocation to the three linesof the NC lathe (that is, without designating the locations ofattachment of the tools designed by the programs). In the machiningexample of FIG. 15, (1) OD turning process, (2) OD thread cutting, (3)D-cutting, (4) cross centering, (5) cross drilling (the above processesbeing performed by securely holding the bar by the front first spindle72), (6) cut-off/pick-off (transfer of bar from first spindle 72 tosecond spindle 74), (B-1) face centering, (B-2) face drilling, (B-3)face tapping, (B-4) OD turning (the above processes being performedwhile securing holding the bar at the back second spindle 74), i.e., atotal of 10 cutting processes (tool path shown schematically by arrows)are read from the design drawings.

Further, the operator can deliberately describe commands for designatingthe attachment locations of the desired tools as tool mounts 88, 90, and94 preset on any one of the tool rests 80, 82, and 84 and produce theprograms 62. In this case, it is possible to configure the system so asto hold with priority the preset data of the tool management set at theuser side in the following flow of automatic production of themulti-line control program and automatically allocate attachmentlocations to the remaining tool mounts for only tools not having presetdata. Further, before starting the automatic production of themulti-line control program, it is advantageous if the operator candesignate whether to hold such tool management preset data withpriority. This will be explained further later with reference to theitem “selection of allocation conditions”.

The programs 62 of the processes read from the design drawings may beproduced manually by the operator or produced using another knownautomatic programming apparatus. Alternatively, it is possible to add anautomatic production function of programs for each process. For example,it is possible to add the configuration of the automatic programmingapparatus 10 explained above to the automatic programming apparatus 50.In this case, the two input units 12 and 52, display units 14 and 54,control units 16 and 56, and storage units 18 and 58 can be combined.

The 10 types of programs 62 produced at step P1 are stored in advance inthe storage unit 58 added with the preparations at the start of themachining order and added with the back spindle separation at the endaccording to the machining order (i.e., order explained above). Notethat the T-code given to each process in FIG. 15 is the tool numbershowing the attachment location of each designated tool described in themulti-line control program produced by the automatic programmingapparatus 50.

The storage unit 58 stores in advance a process list screen 96 (see FIG.16) listing all of the processes required for machining a singleproduct. The programs 62 for the processes stored in the storage unit 58are listed on the process list screen 96 and displayed in a list on thedisplay of the display unit 54 at any time under the control of thecontrol unit 56. As shown in FIG. 16, the display of the display unit 54can display, in parallel with the process list screen 96, a data inputscreen 98 enabling input of various data relating to a processdesignated on the process list screen 96 (in the figure, face drilling)and a program screen 100 describing the program of that process (in thefigure, a face drilling program). Note that in the program described onthe illustrated program screen 100, the tool number is not yetdesignated.

Next, at step P2, the control unit 56 first temporarily allocates theplurality of programs 62 stored in the storage unit 58 to the threelines of the NC lathe. This temporary allocation work is for enablingsmooth execution of the program allocation routine in the followingsteps. While not essential, it is advantageous to for example set asuitable temporary allocation routine in the tool management determiningalgorithms 70. Here, in the mechanical configuration of the NC latheshown in FIG. 13, it is suitable to define the cutting processes by thetools 76 and 78 on the first tool rest 80 in the line 1 as mainprocesses and to define the cutting processes by the tools 76 and 78 onthe second and third tool rests 82 and 84 in the other lines 2 and 3 assupplementary processes. A brief explanation will be given of thetemporary allocation routine in the illustrated embodiment set from sucha viewpoint.

First, the program of the process to be executed first (i.e.,preparations) is arranged at the first position of the programdescription region $1 in the storage unit 58 corresponding to the line1, then the programs of the series of front machining processes (1) to(5) on the bar securely held by the first spindle 72 are arranged in theorder of machining. After that, the portion (or series of blocks) foroperation of the first spindle 72 in the program for thecut-off/pick-off (6) is arranged. The program description region $2 inthe storage unit 58 corresponding to the line 2 has arranged in it theprograms of the series of back machining processes (B-1) to (B-4) forthe bar securely held by the second spindle 74 in the order of machiningand then has arranged after that the program of back spindle separation.The program description region $3 in the storage unit 58 correspondingto the line 3 has arranged in it the portion (or series of blocks) foroperating the second spindle 74 in the programs of the cut-off/pick-off(6). Further, at the ends of the series of blocks in the programdescription regions $1, $2, and $3, programs of end processes arearranged. This completes the temporary allocation. At the stage oftemporary allocation, no program for a cutting process is allocated tothe program description region $3.

When the programs finish being temporarily allocated, as explainedabove, the program allocation processing unit 60 selects and specifiesthe attachment locations of the designated tools 76 and 78 in theplurality of temporarily allocated programs from the plurality of toolmounts 88, 90, and 94 on the three tool rests 80, 82, and 84 under thecontrol of the control unit 56 (step P3). Here, the tool managementdetermining algorithm 70 in the illustrated embodiment will be explainedin brief. First, the attachment locations of the designated tools 76 and78 are alternately selected from the first tool rest 80 and the secondtool rest 82 in accordance with the order of arrangement of the programsfor the plurality of programs described in the program descriptionregions $1 and $2. In this case, to specify the tool attachmentlocations forming the criteria for the selection, the attachmentlocation of the cut-off tool in the plurality of designated tools 76 and78 is designated in advance for the tool mounts 88 and 90 of the firstand second tool rests 80 and 82. The reason for making the cut-off toolthe standard tool in this way is that all of the positional coordinatedata is produced based on the position of the face of the bar formed bythe cut-off tool cutting the bar. Note that the attachment location ofthe cut-off tool can be designated as basic data (in the figure,“cut-off turning tool number”) at the same time as designation of thematerial using the material designating screen 102 for designating thematerial of the workpiece. The material designating screen 102 can beused when automatically producing the programs for the individualprocesses and can be stored in advance in the storage unit 58.

Therefore, when the predesignated attachment location of the cut-offtool is the tool mount 88 on the first tool rest 80 (an identify numberof for example the T10 level being given by the tool mount data 66), theprogram allocation processing unit 60 selects and specifies theattachment location of the designated tool in the next process after thepreparations (in the machining example of FIG. 15, the (1) OD turning)from the tool mounts 90 on the second tool rest 82 (similarly forexample given an identify number of the T20 level), then the T10 leveland T20 level are successively alternately specified for thesucceeding-processes. Conversely, when the attachment location of thecut-off tool is the T20 level, the attachment location of the designatedtool in the next process after the preparations is specified from theT10 level, and the T20 level and T10 level are alternately successivelyspecified for the succeeding processes. In this way, all attachmentlocations of the designated tools 76 and 78 are allocated to the toolmounts 88 and 90 on the first and second tool rests 80 and 82.

Simultaneously, the program allocation processing unit 60, as explainedabove, selects the plurality of tool holders (for example, tool holders92) used for attaching the designated tools 76, 78 on the correspondingtool mounts 88 and 90 based on the tool holder data 68 (step P4). Here,the tool holder data 68 registers a plurality of types of tool holdersby their names and registers as attributes of the tool holders the typesof tool rests for mounting, the positions of the tool mounts able to bemounted on, the types of processes covered in use, the attributes of thetools covered in use, the amounts of tool nose deviation (so-calledshift value), etc. Therefore, the program allocation processing unit 60can select tool holders while referring to the attributes of thedesignated tools 76 and 78 registered in the tool data 64 and thepositions of the tool mounts 88 and 90 registered in the tool mount data66. Note that of course use of a tool holder may not be requireddepending on the attributes of the designated tool and the position ofthe tool mount.

Note that in the illustrated embodiment, when as explained above theoperator registers preset data on the attachment location for a desireddesignated tool in the program, the program allocation processing unit60 specifies the attachment location of the designated tool inaccordance with the preset data upon instruction of the operator andsuitably allocates attachment locations of the other designated toolswith no preset data to the remaining tool mounts 88, 90, and 94.Further, the program allocation processing unit 60 selects tool holdersable to be carried on the specified tool mounts on a priority basis fromthe tool holder data 68 for designated tools for which attachmentlocations are specified in accordance with preset data.

In general, when selecting a tool holder, it is necessary to confirm thestock of the tool holder to be selected. Therefore, in the illustratedembodiment, the stocks of the various tool holders able to be mounted atthe tool rests 80, 82, and 84 of the NC lathe are registered in advancein the tool holder data 68 for different attributes of the tool holders.The stocks of the tool holders can be registered using the holder stockscreen 104 such as shown in FIG. 18. The holder stock screen 104 can bestored in advance in the storage unit 58. The operator can operate theinput unit 52 to display it on the display of the display unit 54.

The program allocation processing unit 60 selects the plurality of toolholders at step P4, then confirms the stocks of the tool holders byreading the information from the tool holder data 68 (step P5). Whenjudging that all of the selected tool holders are in stock, it completesthe holder selection and proceeds to the next step. When there are someselected tool holders not in stock, the routine returns to steps P3 andP4 where the tool mounts 88 and 90 are re-specified and the tool holdersre-selected for all designated tools so as enable the designated toolsfor which tool holders not in stock were selected to be attached atother attachment locations using other tool holders in stock. When toolholders not in stock occur even when trying all possible combinations ofdesignated tools, tool mounts, and tool holders in this way, the unitjudges that there was an error and stops the flow of programming.

When specifying the tool mounts 88 and 90 and selecting the tool holdersfor all designated tools in this way, it is essential not only to judgewhether to give priority to preset data of the tool management for partor all of the designated tools, but also to determine after sufficientstudy the tool management or machining accuracy for shortening as muchas possible the cycle time of the multi-line control program from theviewpoint of allocating the individual processes to the lines in themost advantageous form for the work efficiency and thereby enabling allof the three lines of the NC lathe to be efficiently used. Therefore, inthe illustrated embodiment, one allocation condition selected from thethree allocation conditions of (a) giving priority to preset data oftool management, (b) shortening the cycle time of the multi-line controlprogram, and (c) improving the machining accuracy is added to theabove-mentioned tool management determining algorithm 70, and aplurality of programs are allocated to the three lines of the NC latheunder the selected allocation condition.

In this case, the operator can operate the input unit 52 to input acommand for selecting any one allocation condition from the above threeallocation conditions at the initial stage of the flow of programming inthe automatic programming apparatus 50. Due to this, the control unit 56adds the allocation condition designated by the input unit 52 to thetool management determining algorithm 70 stored in the storage unit 58,and the program allocation processing unit 60 specifies the tool mounts88 and 90 and selects the tool holders in the above way under thedesignated allocation condition.

Explaining this in brief, when designating (a) “giving priority topreset data of tool management” as the allocation condition, asexplained above, the preset data registered by the operator is givenpriority to in the specification of the tool mounts and the selection ofthe tool holders. Further, when designating (b) “shortening the cycletime of the multi-line control program” as the allocation condition, thetool mounts are specified and the tool holders selected for allmachining processes giving the top priority to shortening the cycle time(or total time from start to finish of one multi-line parallel control)regardless of any preset data by the operator. Further, when designating(c) “improving the machining accuracy” as the allocation condition, thetool mounts and tool holders of the tools and the spindles used in themachining processes for which a predetermined accuracy is required(stored in advance in the storage unit 58) are specified with priorityby combinations of the tool rests and spindles enabling high accuracymachining (stored in advance in the storage unit 58), then the toolmounts are specified and the tool holders selected for the remainingmachining processes. In this way, it becomes possible in the end toefficiently allocate the plurality of programs to the three lines of theNC lathe.

Here, an example of the basic thinking relating to the selective use ofthe three lines for improving the work efficiency in the mechanicalconfiguration of the NC lathe shown in FIG. 13 will be brieflyexplained. For example, the first tool rest 80 (or gang) and the secondtool rest 82 (or turret) are advantageously alternately used (that is,the tools are arranged) in the order of arrangement of the programsconsidering the fact that a relatively longer time is required for thetool selection operation in the second tool rest 82. At this time, ifeffectively using the third tool rest 84 (“Back 3”) in the drilling andtapping in the back machining processes, the first tool rest 80 and thesecond tool rest 82 can be alternately used in the front machiningprocesses during that time and therefore the tool selection time can beeffectively reduced. Note that the ID and OD turning in the backmachining processes can only be performed by tools on the second toolrest 82, so during that time the first tool rest 80 is used in the frontmachining processes. Further, the OD threading in the front machiningprocesses requires repeated threading operations, so basically thesecond tool rest 82 (able to move in Z-axis) is used rather than thefirst tool rest 80 (unable to move in z-axis). If using the first toolrest 80 in the OD threading, since the first spindle 72 is made to movealong the Z-axis, the operator preferably is aware that the length to bemachined of the bar will be repeatedly pulled inside the guide bush 86.

In this way, when allocating the plurality of processes required forproduction of a machined product to a plurality of lines of an NC lathe,considering the work efficiency at the NC lathe, it is advantageous toset in advance a plurality of types of machining patterns suitablycombining the first and second spindles 72 and 74 and the first to thirdtool rests 80, 82, and 84 for machining operations. Therefore, in theillustrated embodiment, such a plurality of types of machining patterns106 (FIG. 12) are set in advance and stored in the storage unit 58, andthe program allocation processing unit 60 performs processing to selectseveral suitable machining patterns under the above designatedallocation conditions and allocate the plurality of programs to thethree lines of the NC lathe based on these selected machining patterns.

As examples of such machining patterns, in the illustrated embodiment,“twin turret machining”, “two saddle machining”, “front/back machining”,“three-line machining”, and “pick-off/center support”, that is, fivetypes of machining patterns, are stored in the storage unit 58. Twinturret machining is the most often used standard machining pattern. Theprogram allocation processing unit 60 basically selects this machiningpattern, then selects other machining patterns able to be combined withit. The machining work defined by the twin turret machining is frontmachining work alternately using the first tool rest 80 (gang) andsecond tool rest 82 (turret) in the line 1. During that time, it ispossible to perform back machining by the third tool rest 84 (“Back 3”)in the line 3. Twin saddle machining is a machining pattern performingsimultaneous front machining such as rough/finishing machining orsimultaneous thread cutting (different pitches) by the line 1 and line 2or allocating the C1 axis positioning operation of the first spindle 72to either the first tool rest 80 (line 1) or second tool rest 82 (line2). During that time, it is possible to perform back machining using thethird tool rest 84 by the line 3.

Front/back machining is a machining pattern where front machining andback machining are performed simultaneously independent from each other.When the plurality of processes includes a back machining process, theprogram allocation processing unit 60 basically selects this machiningpattern. In front/back machining, it is possible to perform backmachining alternately using the second tool rest 82 and the third toolrest 84 between the line 2 and line 3. Three-line machining selects thecase of simultaneous machining (for example, front OD machining andfront/back centering) in the three lines. In three-line machining,however, the third tool rest 84 cannot be used. Pick-off/center supportselects the case of transfer of the bar from the first spindle 72 to thesecond spindle 74 and center support using the second spindle 74.

In this way, in the automatic programming apparatus 50, the plurality ofprocesses are allocated to three lines based on preset machiningpatterns. The routine for determination of the most efficientcombination of machining patterns differs somewhat depending on theexistence of any back machining processes, however. Referring again tothe flow charts of FIG. 14A and FIG. 14B, after the tool mounts 88 and90 have finished being specified and the tool holders selected for allof the designated tools at steps P3 to P5, the control unit 56 judgeswhether there is any program for a back machining process in theplurality of programs at the next step P6. When there is a backmachining process, it temporarily determines by which combination ofmachining patterns to perform all of the processes (step P7).

Further, after allocating the plurality of programs to the three linesbased on the temporarily determined combination of machining patterns,the unit calculates the individual program execution times of the frontmachining processes and back machining process, restudies whether it ispossible to change to a best combination of machining patterns furtherimproved in efficiency (that is, increased in parallel work time) underthe above designated allocation condition, and adopts the bestcombination of machining patterns when such a change is possible (stepP8). On the other hand, when there is no program for a back machiningprocess in the plurality of programs, the step of temporarydetermination of the machining patterns is unnecessary and thecombination of machining patterns is immediately determined at step P8.

In this way, when the tool mounts 88 and 90 finish being specified andthe tool holders selected and further the combination of the machiningpatterns is determined, the plurality of programs 62 stored in thestorage unit 58 are allocated to the three lines of the NC lathe in themost advantageous form in terms of work efficiency (step P9). At thistime, the program allocation processing unit 60 describes the toolmanagement commands (or T codes) designating the tool mounts 88, 90, and94 specified for the designated tools in the plurality of programs 62stored in the storage unit 58. The determined T-codes and thecorresponding names etc. of the designated tools and tool holders can bedisplayed on the display of the display unit 54 using for example thetool management determining screen 108 shown in FIG. 19.

As explained above, the various tool holders used in the NC lathe haveas attributes different inherent tool nose deviations (or shift values).Therefore, in the illustrated embodiment, at step P9, after the toolmanagement commands in the individual machining programs are determined,the program allocation processing unit 60 reads the various tool nosedeviations (or shift values) of the plurality of tool holders selectedat steps P3 to P5 from the tool holder data 68 stored in the storageunit 58 and describes the position correction commands for the toolnoses in the machining programs (step 10). In this way, the automaticproduction of the multi-line control program is completed. The producedmulti-line control program can be displayed on the display of thedisplay unit 54 using the multi-line control program screen 110 such asshown in FIG. 20.

The automatic programming apparatus 50 can have a graphic function forgraphically displaying the multi-line control program automaticallyproduced in this way on the display of the display unit 54 uponinstruction of the operator. In this case, the storage unit 58 stores inadvance a graphic screen for graphically displaying the multi-linecontrol program, while the control unit 56 displays the plurality ofprograms allocated to the three lines by the program allocationprocessing unit 60 on the graphic screen arranged at a plurality ofstrips in time series for each of the lines. The graphic screen has thescreen configuration shown in for example FIG. 21 and FIG. 22. Thegraphic screen 112 shown in FIG. 21 graphically displays the multi-linecontrol program displayed at the multi-line control program screen 110of FIG. 20. This multi-line control program is automatically producedunder the allocation condition “giving priority to preset data of toolmanagement” in accordance with the program production flow explainedabove.

As illustrated, in the program description region $1 in the graphicscreen 112 corresponding to the line 1 of the NC lathe, the programs ofthe front machining processes (1) to (5) in the example of machining ofFIG. 15 are arranged in the order of machining from the left to right inthe figure in the form of a plurality of rectangular strips. In thedisplayed example, graphics indicating the contents of the programs aredisplayed immediately above the strips. The fact that the OD turning(1), D-cutting (3), cross centering (4), and cross drilling (5) areperformed by the tools of the first tool rest 80 (gang), while the ODthread cutting (2) is performed by a tool on the second tool rest 82(turret) will be understood at a glance along with the elapsed times ofthe processes. Further, a strip corresponding to the portion foroperation of the first spindle 72 in the program of the cut-off/pick-off(6) is arranged behind (right in the figure) the group of strips of thefront machining processes.

Further, in the program description region $3 corresponding to the line3, the programs of the face centering (B-1), face drilling (B-2), andface tapping (B-3) in the back machining processes in the machiningexample of FIG. 15 are arranged in the order of machining from the leftto the right of the figure in the form of a plurality of rectangularstrips together with graphics illustrating the contents of the programs.These back machining processes are executed on the bar transferred fromthe first spindle 72 to the second spindle 74 through the pick-offprocess after the end of the front machining processes executed by theline 1. In the displayed example, the fact that these back machiningprocesses all use the third tool rest 84 (“Back 3”) will be understoodfrom a glance along with the elapsed times of the processes. Further, astrip corresponding to the portion for operation of the second spindle74 in the program of the cut-off/pick-off (6) is arranged behind (rightside in the figure) the group of strips of the back machining processes.Note that the first and second machining processes in the line 1 areallocated to the machining pattern “twin turret machining”, while thefirst to second back machining processes are allocated to the line 3 tobe simultaneously machined in parallel with the two front machiningprocesses.

Further, in the program description region $2 corresponding to the line2, the program of the last OD turning (B-4) in the machining example ofFIG. 15 and the program of the last back spindle separation are arrangedin the order of machining from the left to the right of the figure inthe form of a plurality of rectangular strips together with graphicsillustrating the contents of the programs. In the displayed example, thefact that these back machining processes all use the second tool rest 82(turret) will be understood from a glance along with the elapsed timesof the processes. Further, the fact that these back machining processesat the line 2 are executed after suitable queuing after the end of theback machining processes in the line 3 will be understood at one glance.Note that the third to fifth front machining processes in the line 1,the third back machining process in the line 3, and the back machiningprocess in the line 2 are allocated to the lines by the machiningpattern of “front/back machining”. Further, the fact that queuingprocessing is performed among the three lines even at the positionswhere the machining patterns are switched will also be understood. Inthis way, there is the advantage that by displaying a graph of themulti-line control program, any parallel or simultaneous nature andqueuing among lines will be easily understood at one glance.

The multi-line control program displayed on the graphic screen 112 ofFIG. 21 was, as explained above, produced with “giving priority topreset data of tool management” as the allocation condition. The ODthreading (2) in the front machining process is executed by a tool onthe second tool rest 82 (turret) in accordance with preset datadesignated by the operator. The cycle time in the multi-line controlprogram is 42.5 seconds as illustrated. As opposed to this, themulti-line control program displayed on the graphic screen 114 of FIG.22 was produced as a multi-line control program having the same group ofprocesses as the multi-line control program of FIG. 21 but using“shortening the cycle time of the multi-line control program” as theallocation condition. In this multi-line control program, compared withthe multi-line control program of FIG. 21, the cycle time is shortenedto 40.7 seconds as illustrated as in the designated condition. The ODthreading (2) in the front machining process, however, is executed usingthe first tool rest 80 (gang type) regardless of any preset data of theoperator.

Note that in the automatic programming apparatus 50, it is advantageousif the system is designed so that the operator can suitably operate theinput unit 52 and instruct a change of the combination of the machiningpatterns on the graphic screen displayed at the display unit 54. Due tothis, it becomes possible to freely correct the automatically producedmulti-line control program making use of the experience and knowledge ofthe operator.

In this way, according to the automatic programming apparatus 50, whenproducing a multi-line control program for executing a plurality ofprocesses required for producing a single machined product in parallelby a plurality of lines of an NC machine tool, an operator does not haveto study in detail which lines to allocate the individual processes to.Further, in the automatic programming apparatus 50, since the allocationof the plurality of designated tools to the plurality of tool mountsprovided on one or more tool rests is determined automatically withreference to the number of the plurality of types of tool holders instock for each type and their attributes and all processes are allocatedto the plurality of lines in the most advantageous form in terms of workefficiency under the desired allocation condition, even an operator withlittle knowledge or experience can initiate automatic production of amulti-line control program superior in quality (length of cycle time,appropriateness of tool management, machining accuracy, etc.)

As clear from the above explanation, according to the present invention,there are provided an automatic programming method and automaticprogramming apparatus for automatically producing a multi-line controlprogram to be executed by a multi-spindle, multi-line control NC machinetool which enable the plurality of processes required for production ofa machined product to be efficiently and suitably automaticallyallocated to the plurality of lines and therefore enable quick automaticproduction of a high quality multi-line control program without beinggoverned by the level of knowledge or experience of the operator.

FIG. 23 is a flow chart showing a program display processing methodaccording to an embodiment of the present invention. This programdisplay processing method can be used as the processing method forgraphically displaying the automatically produced multi-line controlprogram on the display of the display unit 54 in the above-mentionedautomatic programming apparatus 50. In this case, the processing inaccordance with the illustrated flow chart is executed under the controlof the control unit 56 of the automatic programming apparatus 50.

First, step Q1 comprises extracting and suitably processing requireddata from the process data table 116 registering various data relatingto the plurality of processes required for machining a product andproducing a multi-line control program allocating the programscorresponding to the plurality of processes to the plurality of lines.The data registered in the process data table 116 includes programs ofindividual processes, process numbers, process names, tool information(types, numbers and names), tool holder information, etc. Further,information such as the line no., the positions of the start blocks andthe positions of the end blocks of the programs, etc. are taken out fromthe produced multi-line control program and registered in the end table118 of the processes as data for clarifying the division betweenprocesses.

Here, when producing a multi-line control program by the above-mentionedautomatic programming apparatus 50, the process data table 116 is storedin the storage unit 58 including the programs 62, tool data 64, toolmount data 66, tool holder data 68, tool management determiningalgorithms 70, etc. Further, the produced multi-line control program isstored in the storage unit 58, and the process end table 118 is storedin the storage unit 58.

Next, step Q2 comprises calculating the required execution time for theindividual blocks in the programs in the multi-line control programbased on the cutting speeds of the tools, distances of movement, etc.due to the programs. At this stage, the presence of any queuing timebetween the programs between lines is not considered. Further, theexecution time for each block calculated is written into an elapsed timetable 120. Note that the elapsed time table 120 can also be stored inthe storage unit 58 of the automatic programming apparatus 50.

Step Q3 comprises investigating the queuing position of the blocksbetween lines in the multi-line control program and writing informationsuch as the line no., queuing no., queuing block position, etc. in thequeuing block position table 122. Note that the queuing block positiontable 122 can also be stored in the storage unit 58 of the automaticprogramming apparatus 50.

Next, step Q4 comprises successively adding the execution times of theindividual blocks to individually calculate the elapsed times from thestart of the series of programs of the lines, that is, the start of theprograms, to each block. At this time, it fetches the information on thequeuing block positions etc. written into the queuing block positiontable 122 and, when there is a queuing block in the middle of a programin one line, calculates and compares the elapsed time to the queuingblock in that line and the elapsed time to the corresponding queuingblock in another line. Further, it sets the longest elapsed time in theelapsed times as the starting time of the next block after that queuingblock and, based on this, calculates the elapsed time of the succeedingblocks. The elapsed times for each block calculated in this way areregistered in the elapsed time table 120.

Step Q5 comprises comparing the elapsed times of the final blocks of alllines calculated at step Q4 and defining the longest elapsed time as thecycle time of the multi-line control program. Next, step Q6 comprisescalculating the program start time for each process and machining timein each line. At this time, it takes out and uses the requiredinformation from the process end table 118 and the elapsed time table120. The start times and machining times of the processes calculated inthis way are registered in the process time data table 124. Note thatthe process time data table 124 can also be stored in the storage unit58 of the automatic programming apparatus 50.

Step Q7 comprises calculating the intervals of the time graduations atthe graphic screen based on the cycle time determined at step Q5 so asto enable the display of the entire graphed multi-line control programwithin the display screen for showing the program (for example, thedisplay of the display unit 54 of the automatic programming apparatus50). Next, step Q8 comprises displaying rectangular strips expressingthe individual processes positioned with their start times in thecorresponding lines with reference to the time graduations calculated atstep Q7 based on the data of the start times and machining times of theprocesses registered in the process time data table 124. The lengths ofthe strips displayed in this way in the graduation direction express themachining time. In this way, the graphic display of the multi-linecontrol program ends.

FIG. 24A is a view of an example of a graphic screen 126 obtained by theabove program display processing method. This graphic screen 126displays the multi-line control program of the example of machining theproduct of FIG. 15 produced by the automatic programming apparatus 50 onthe display of the display unit 54 and is similar to the graphic screens112 and 114 shown in FIG. 21 and FIG. 22. Note that in the screen, thebroken lines led in the vertical direction across the three lines showthe queuing positions between lines when the machining patterns arechanged, while the graduations of the ordinate show units of seconds.

FIG. 24B shows the state when an operator instructs a strip (forexample, clicks on it by the mouse) expressing a desired process (in thefigure, the OD threading (2)) by the graphic screen 126 of FIG. 24A. Inthis state, as illustrated, it is advantageous to display the requiredtime, number, and name of the instructed process, the type, number, andname of the tool used, and the tool holder information in the processinformation display field provided at the bottom left area of thegraphic screen 126.

In this way, according to the program display processing methodaccording to the present invention, by displaying the multi-line controlprogram on a graphic screen, it is possible to confirm at a singleglance the required time of each process and the queuing times betweenlines in the multi-line control program from the state of thecorresponding rectangular strips. Therefore, the operator can easilyconfirm the content of the produced machining program and can easilyoptimize the programming for the purpose of for example shortening themachining time. Further, it can judge whether the order of execution ofthe plurality of processes for producing a single machined product canbe changed and predict the effect of the change of the order of theprocesses on the series of machining programs as a whole.

In the above program display processing method, when graphicallydisplaying the multi-line control program produced by the automaticprogramming apparatus 50, enabling the operator to instruct a change ofthe combination of the above machining patterns on the displayed graphicscreen is advantageous in terms of enabling the multi-line controlprogram to be corrected making use of the experience and knowledge(knowhow) of the user.

FIG. 25 is a flow chart of a program display processing method accordingto another embodiment of the present invention for changing thecombination of machining patterns. This program display processingmethod is used as the processing method when the above-mentionedautomatic programming apparatus 50 graphically displays theautomatically produced multi-line control program on the display of thedisplay unit 54 and for example can be supplementarily executed for thegraphic screen produced by the program display processing method shownin FIG. 23. Therefore, the processing in accordance with the illustratedflow chart is executed under the control of the control unit 56 of theautomatic programming apparatus 50.

First, step U1 comprises selecting and designating a changed machiningpattern on the graphic screen displaying the multi-line control program(for example, graphic screen 126 of FIG. 24A) when there is a process onthe screen for which change to another machining pattern is believeddesirable. For example, the operator designates the desired machiningpattern among the five machining patterns displayed at the bottom rightarea of the screen in the graphic screen 126 (for example, double clickson the square space to the left of the selected machining pattern).

Next, step U2 comprises searching for processes which can be changed tothe designated machining pattern and attaches marks to the rectangularstrips showing the processes on the screen. For example, on the graphicscreen 126, the display colors of the strips showing the changeableprocesses are automatically changed. Note that in this process searchstep, it is possible to extract and search for the required data fromthe above-mentioned process data table 116. Next, step U3 comprisesinstructing the marked processes on the screen. For example, the stripsof the changeable processes are clicked on at the graphic screen 126.

FIG. 26 shows a graphic screen 128 after designating the changedmachining pattern for the graphic screen 12-6 and instructing theprocesses able to be changed to the machining pattern. On this graphicscreen 128, “front/back machining” is designated as the changedmachining pattern. Due to this, the frames surrounding the stripsshowing the OD turning (1) and OD threading (2) instructed are removed.

When the changed machining pattern is a machining pattern forsimultaneous machining, step U4 comprises examining if the machiningpattern of the instructed processes can be changed to a simultaneousmachining type. That is, it comprises automatically studying at thecontrol unit 6 if the processes can be performed simultaneously withother processes, if the rotational speed and other cutting conditionsmatch between two processes, and if the relationship of the machiningpositions between the two processes is suitable. If it is judged that itcannot be changed as a result, step U5 proceeds to the display of anerror message. Only if it is judged that it can be changed does theroutine proceed to the next step U6.

Step U6 comprises rearranging the group of processes in the multi-linecontrol program corresponding to the change of the instructed machiningpattern. That is, it automatically performs the work of inserting thethen required queuing blocks into the series of programs of the lines orreassigning the used tools corresponding to the change in the machiningpattern under the control of the control unit 56. In this way, thegraphic display of the multi-line control program changed in themachining pattern ends.

FIG. 27 shows a graphic screen 130 displaying a multi-line controlprogram after changing a machining pattern for the graphic screen 128 ofFIG. 26 by the above program display processing method. In this graphicscreen 130, the OD turning (1) and OD threading (2) in the line $1 andthe face centering (B-1) and face drilling (B-2) in the line $3 areprogrammed to be executed by the “front/back machining” pattern togetherwith the later face tapping (B-3) in the line $3. As a result, the cycletime of the multi-line control program is reduced from 42.3 seconds(FIG. 26) to 40.6 seconds.

In this way, according to the program display processing methodaccording to the present invention, by the operator performing suitableoperations on a graphic screen displaying a multi-line control program,it is possible to easily correct a multi-line control program by makinguse of the experience and knowledge (knowhow) of the user.

Above, preferred embodiments of the present invention were explained,but the present invention is not limited to the above embodiments andcan be changed and modified in various ways within the scope ofdisclosure of the claims.

1. An automatic programming method for automatically producing amulti-line control program executed in an NC machine tool provided withat least one spindle and at least one tool rest, both operable undercontrol in a plurality of lines, comprising: individually preparing andpreviously registering a plurality of programs for controlling aplurality of processes required to manufacture a machined product insaid NC machine tool, without considering allocation of the programs tosaid plurality of lines; previously registering tool data relating toattributes of a plurality of types of tools capable of being used in aplurality of types of cutting processes capable of being performed insaid NC machine tool; previously registering tool mount data relating topositions, in said at least one tool rest, of a plurality of sets oftool mounts provided in said at least one tool rest; previouslyregistering a tool holder data relating to attributes of a plurality oftypes of tool holders capable of being installed onto said tool mounts;previously setting and registering a tool management determiningalgorithm used for allocating mounting locations of a plurality ofdesignated tools, designated in said plurality of programs, for saidtool mounts, provided that some of said programs are executedsimultaneously in at least two lines among said plurality of lines;specifying a plurality of tool mounts, as said mounting locations ofdesignated tools, allowing execution of a program associated with saiddesignated tools, among said plurality of tool mounts, on the basis ofsaid tool data and said tool mount data, and selecting a plurality oftool holders used for mounting said designated tools correspondinglyonto said plurality of tool mounts as specified, on the basis of saidtool data and said tool holder data, in accordance with said toolmanagement determining algorithm; and describing a command, designatingsaid plurality of tool mounts as specified, into said plurality ofprograms, after the selecting of a plurality of tool holders iscompleted, and automatically allocating said plurality of programs tosaid plurality of lines.
 2. An automatic programming method as set forthin claim 1, further comprising, prior to the allocating of saidplurality of programs to said plurality of lines, selecting either oneof three allocation conditions such as a preset data priority of toolmanagement, a cycle time reduction of a multi-line control program andan improvement of machining accuracy; wherein said plurality of programsare automatically allocated to said plurality of lines under anallocation condition as selected.
 3. An automatic programming method asset forth in claim 1, further comprising, prior to the allocating ofsaid plurality of programs to said plurality of lines, previouslysetting and registering a plurality of types of machining patterns forcausing machining operations in a suitable combination of said at leastone spindle and said at least one tool rest; wherein said plurality ofprograms are automatically allocated to said plurality of lines on thebasis of some machining patterns selected from said plurality of typesof machining patterns.
 4. An automatic programming method as set forthin claim 1, wherein said tool holder data includes an offset value of atool nose inherent in each of said plurality of types of tool holders;and further comprising, after the selecting of said plurality of toolholders, describing a command of position compensation into saidplurality of programs, on the basis of said offset value of tool nose ofeach of said tool holders as selected.
 5. An automatic programmingmethod as set forth in claim 1, wherein said tool holder data includesnumbers of said plurality of types of tool holders in stock, preparedrespectively for the attributes of the holders; and wherein saidplurality of tool holders are selected under consideration of saidnumbers in stock.
 6. An automatic programming apparatus forautomatically producing a multi-line control program to be executed inan NC machine tool provided with at least one spindle and at least onetool rest, both operable under control in a plurality of lines,comprising: a storage unit previously storing a plurality of programsindividually prepared for controlling a plurality of processes requiredto manufacture a machined product in said NC machine tool, withoutconsidering allocation of the programs to said plurality of lines; tooldata relating to attributes of a plurality of types of tools capable ofbeing used in a plurality of types of cutting processes capable of beingperformed in said NC machine tool; tool mount data relating topositions, in said at least one tool rest, of a plurality of tool mountsprovided in said at least one tool rest; tool holder data relating toattributes of a plurality of types of tool holders capable of beinginstalled onto said tool mounts; and a tool management determiningalgorithm used for allocating mounting locations of a plurality ofdesignated tools, designated in said plurality of programs, for saidtool mounts, provided that some of said programs are executedsimultaneously in at least two lines among said plurality of lines; aprogram allocation processing unit specifying a plurality of toolmounts, as said mounting locations of designated tools, allowingexecution of a program associated with said designated tools, among saidplurality of tool mounts, on the basis of said tool data and said toolmount data stored in said storage unit, and selecting a plurality oftool holders used for mounting said designated tools correspondinglyonto said plurality of tool mounts as specified, on the basis of saidtool data and said tool holder data stored in said storage unit, inaccordance with said tool management determining algorithm; said programallocation processing unit describing a command, designating saidplurality of tool mounts as specified, into said plurality of programs,after the selecting of a plurality of tool holders is completed, andautomatically allocating said plurality of programs to said plurality oflines.
 7. An automatic programming apparatus as set forth in claim 6,further comprising an input unit accepting a designation for selectingeither one of three allocation conditions such as a preset data priorityof tool management, a cycle time reduction of multi-line controlprogram, and an improvement of machining accuracy; wherein said programallocation processing unit automatically allocates said plurality ofprograms to said plurality of lines under an allocation condition asselected through said input unit.
 8. An automatic programming apparatusas set forth in claim 6, wherein said storage unit previously stores aplurality of types of machining patterns for causing machiningoperations in a suitable combination of said at least one spindle andsaid at least one tool rest; and wherein said program allocationprocessing unit automatically allocates said plurality of programs tosaid plurality of lines on the basis of some machining patterns selectedfrom said plurality of types of machining patterns stored in saidstorage unit.
 9. An automatic programming apparatus as set forth inclaim 6, wherein said tool holder data stored in said storage unitincludes an offset value of a tool nose inherent in each of saidplurality of types of tool holders; and wherein said program allocationprocessing unit reads, after the selecting of said plurality of toolholders is completed, said offset value of tool nose in each of saidtool holders as selected, from said tool holder data, and describes acommand of position compensation into said plurality of programs, on thebasis of said offset value of tool nose as read.
 10. An automaticprogramming apparatus as set forth in claim 6, wherein said tool holderdata stored in said storage unit includes numbers of said plurality oftypes of tool holders in stock, prepared respectively for the attributesof the holders; and wherein said program allocation processing unitspecifies said plurality of tool mounts and selects said plurality oftool holders, under consideration of said numbers in stock read fromsaid tool holder data.